diff options
author | Olof Johansson <olof@lixom.net> | 2012-11-05 10:09:12 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-11-05 10:09:12 -0800 |
commit | 6d06721570aa0c38d886e3036796d59983963a27 (patch) | |
tree | d674cf54e26837bee89095c211ffa362c8546f03 /drivers/char | |
parent | 148a8698763130c96004ef419b5f0d44a93d413c (diff) | |
parent | 54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c (diff) | |
download | linux-6d06721570aa0c38d886e3036796d59983963a27.tar.gz linux-6d06721570aa0c38d886e3036796d59983963a27.tar.xz |
Merge branch 'depends/tty' into next/headers
Merging in Greg's tty tree including a cleanup patch needed by the OMAP serial
header cleanups.
* depends/tty: (305 commits)
tty/serial/8250: Make omap hardware workarounds local to 8250.h
serial/8250/8250_early: Prevent rounding error in uartclk
serial: samsung: use clk_prepare_enable and clk_disable_unprepare
TTY: Report warning when low_latency flag is wrongly used
console: use might_sleep in console_lock
TTY: move tty buffers to tty_port
TTY: add port -> tty link
TTY: tty_buffer, cache pointer to tty->buf
TTY: move TTY_FLUSH* flags to tty_port
TTY: n_tty, propagate n_tty_data
TTY: move ldisc data from tty_struct: locks
TTY: move ldisc data from tty_struct: read_* and echo_* and canon_* stuff
TTY: move ldisc data from tty_struct: bitmaps
TTY: move ldisc data from tty_struct: simple members
TTY: n_tty, add ldisc data to n_tty
TTY: audit, stop accessing tty->icount
TTY: n_tty, remove bogus checks
TTY: n_tty, simplify read_buf+echo_buf allocation
TTY: hci_ldisc, remove invalid check in open
TTY: ldisc, wait for idle ldisc in release
...
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/Makefile | 1 | ||||
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 2 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 2 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 36 |
4 files changed, 36 insertions, 5 deletions
diff --git a/drivers/char/Makefile b/drivers/char/Makefile index d0b27a39f1d4..7ff1d0d208a7 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -52,7 +52,6 @@ obj-$(CONFIG_TELCLOCK) += tlclk.o obj-$(CONFIG_MWAVE) += mwave/ obj-$(CONFIG_AGP) += agp/ obj-$(CONFIG_PCMCIA) += pcmcia/ -obj-$(CONFIG_IPMI_HANDLER) += ipmi/ obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o obj-$(CONFIG_TCG_TPM) += tpm/ diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index e01f5eaaec82..38390f7c6ab6 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c @@ -667,7 +667,7 @@ static int intel_gtt_init(void) gtt_map_size = intel_private.base.gtt_total_entries * 4; intel_private.gtt = NULL; - if (INTEL_GTT_GEN < 6) + if (INTEL_GTT_GEN < 6 && INTEL_GTT_GEN > 2) intel_private.gtt = ioremap_wc(intel_private.gtt_bus_addr, gtt_map_size); if (intel_private.gtt == NULL) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 2c29942b1326..a0c84bb30856 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -1880,7 +1880,7 @@ int ipmi_request_supply_msgs(ipmi_user_t user, struct ipmi_recv_msg *supplied_recv, int priority) { - unsigned char saddr, lun; + unsigned char saddr = 0, lun = 0; int rv; if (!user) diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 83f85cf7fb1b..32a6c7e256bd 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2424,6 +2424,38 @@ static void ipmi_pci_cleanup(struct smi_info *info) pci_disable_device(pdev); } +static int __devinit ipmi_pci_probe_regspacing(struct smi_info *info) +{ + if (info->si_type == SI_KCS) { + unsigned char status; + int regspacing; + + info->io.regsize = DEFAULT_REGSIZE; + info->io.regshift = 0; + info->io_size = 2; + info->handlers = &kcs_smi_handlers; + + /* detect 1, 4, 16byte spacing */ + for (regspacing = DEFAULT_REGSPACING; regspacing <= 16;) { + info->io.regspacing = regspacing; + if (info->io_setup(info)) { + dev_err(info->dev, + "Could not setup I/O space\n"); + return DEFAULT_REGSPACING; + } + /* write invalid cmd */ + info->io.outputb(&info->io, 1, 0x10); + /* read status back */ + status = info->io.inputb(&info->io, 1); + info->io_cleanup(info); + if (status) + return regspacing; + regspacing *= 4; + } + } + return DEFAULT_REGSPACING; +} + static int __devinit ipmi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2476,8 +2508,8 @@ static int __devinit ipmi_pci_probe(struct pci_dev *pdev, } info->io.addr_data = pci_resource_start(pdev, 0); - info->io.regspacing = DEFAULT_REGSPACING; - info->io.regsize = DEFAULT_REGSPACING; + info->io.regspacing = ipmi_pci_probe_regspacing(info); + info->io.regsize = DEFAULT_REGSIZE; info->io.regshift = 0; info->irq = pdev->irq; |