summaryrefslogtreecommitdiff
path: root/drivers/tty/serial
AgeCommit message (Collapse)Author
2011-07-26atomic: use <linux/atomic.h>Arun Sharma
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-07-25Merge branch 'tty-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (26 commits) amba pl011: workaround for uart registers lockup n_gsm: fix the wrong FCS handling pch_uart: add missing comment about OKI ML7223 pch_uart: Add MSI support tty: fix "IRQ45: nobody cared" PTI feature to allow user to name and mark masterchannel request. 0 for o PTI Makefile bug. tty: serial: samsung.c remove legacy PM code. SERIAL: SC26xx: Fix link error. serial: mrst_max3110: initialize waitqueue earlier mrst_max3110: Change max missing message priority. tty: s5pv210: Add delay loop on fifo reset function for UART tty/serial: Fix XSCALE serial ports, e.g. ce4100 serial: bfin_5xx: fix off-by-one with resource size drivers/tty: use printk_ratelimited() instead of printk_ratelimit() tty: n_gsm: Added refcount usage to gsm_mux and gsm_dlci structs tty: n_gsm: Add raw-ip support tty: n_gsm: expose gsmtty device nodes at ldisc open time pch_phub: Fix register miss-setting issue serial: 8250, increase PASS_LIMIT ...
2011-07-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
2011-07-25Merge branch 'next/deletion' of ↵Linus Torvalds
git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc * 'next/deletion' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: ARM: mach-loki: delete ARM: mach-s3c2400: delete ARM: mach-s3c24a0: delete
2011-07-25Merge branch 'next/cleanup' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc * 'next/cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (133 commits) ARM: EXYNOS4: Change devname for FIMD clkdev ARM: S3C64XX: Cleanup mach/regs-fb.h from mach-s3c64xx ARM: S5PV210: Cleanup mach/regs-fb.h from mach-s5pv210 ARM: S5PC100: Cleanup mach/regs-fb.h from mach-s5pc100 ARM: S3C24XX: Use generic s3c_set_platdata for devices ARM: S3C64XX: Use generic s3c_set_platdata for OneNAND ARM: SAMSUNG: Use generic s3c_set_platdata for NAND ARM: SAMSUNG: Use generic s3c_set_platdata for USB OHCI ARM: SAMSUNG: Use generic s3c_set_platdata for HWMON ARM: SAMSUNG: Use generic s3c_set_platdata for FB ARM: SAMSUNG: Use generic s3c_set_platdata for TS ARM: S3C64XX: Add PWM backlight support on SMDK6410 ARM: S5P64X0: Add PWM backlight support on SMDK6450 ARM: S5P64X0: Add PWM backlight support on SMDK6440 ARM: S5PC100: Add PWM backlight support on SMDKC100 ARM: S5PV210: Add PWM backlight support on SMDKV210 ARM: EXYNOS4: Add PWM backlight support on SMDKC210 ARM: EXYNOS4: Add PWM backlight support on SMDKV310 ARM: SAMSUNG: Create a common infrastructure for PWM backlight support clocksource: convert 32-bit down counting clocksource on S5PV210/S5P64X0 ... Fix up trivial conflict in arch/arm/mach-imx/mach-scb9328.c
2011-07-22Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: dt: include linux/errno.h in linux/of_address.h of/address: Add of_find_matching_node_by_address helper dt: remove extra xsysace platform_driver registration tty/serial: Add devicetree support for nVidia Tegra serial ports dt: add empty of_property_read_u32[_array] for non-dt dt: bindings: move SEC node under new crypto/ dt: add helper function to read u32 arrays tty/serial: change of_serial to use new of_property_read_u32() api dt: add 'const' for of_property_read_string parameter **out_string dt: add helper functions to read u32 and string property values tty: of_serial: support for 32 bit accesses dt: document the of_serial bindings dt/platform: allow device name to be overridden drivers/amba: create devices from device tree dt: add of_platform_populate() for creating device from the device tree dt: Add default match table for bus ids
2011-07-21Merge branch 'next-samsung-clkdev-fix' into next-samsung-cleanupKukjin Kim
2011-07-20serial: Remove redundant console_initcall from s3c and s5p console driversThomas Abraham
Uart port is registered as a console during the driver's probe. So explict registration of console with console_initcall is removed. Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> [kgene.kim@samsung.com: removed changes of s3c2400 and s3c24a0] Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-07-18ARM: mach-s3c2400: deleteNicolas Pitre
On Tue, 28 Jun 2011, Ben Dooks wrote: > On Tue, Jun 28, 2011 at 11:22:57PM +0200, Arnd Bergmann wrote: > > > On a related note, what about mach-s3c2400? It seems to be even more > > incomplete. > > Probably the same fate awaits that. It is so old that there's little > incentive to do anything with it. So out it goes as well. The PORT_S3C2400 definition in include/linux/serial_core.h is left there to prevent a reuse of the same number for another port type. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
2011-07-18ARM: mach-s3c24a0: deleteNicolas Pitre
Commit bcae8aeb32 "[ARM] S3C24A0: Initial architecture support files" brought in a bunch of files while explicitly leaving out the corresponding Kconfig entry, stating that the series is not complete. More than 2.5 years later, the support for this has not seen any progress. This is therefore dead code. If someone wants to revive this code, it is always possible to retrieve it from the Git repository. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Acked-by: Ben Dooks <ben-linux@fluff.org> Acked-by: Arnd Bergmann <arnd@arndb.de>
2011-07-15Merge commit 'v3.0-rc7' into devicetree/nextGrant Likely
2011-07-14Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/bluetooth/l2cap_core.c
2011-07-11Merge branch 'master' into for-nextJiri Kosina
Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
2011-07-10tty/serial: Add devicetree support for nVidia Tegra serial portsGrant Likely
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-07-08amba pl011: workaround for uart registers lockupShreshtha Kumar Sahu
This workaround aims to break the deadlock situation which raises during continuous transfer of data for long duration over uart with hardware flow control. It is observed that CTS interrupt cannot be cleared in uart interrupt register (ICR). Hence further transfer over uart gets blocked. It is seen that during such deadlock condition ICR don't get cleared even on multiple write. This leads pass_counter to decrease and finally reach zero. This can be taken as trigger point to run this UART_BT_WA. Workaround backups the register configuration, does soft reset of UART using BIT-0 of PRCC_K_SOFTRST_SET/CLEAR registers and restores the registers. This patch also provides support for uart init and exit function calls if present. Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08pch_uart: add missing comment about OKI ML7223Alexander Stein
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Reviewed-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-08pch_uart: Add MSI supportAlexander Stein
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-07serial: samsung: Fix unintended usage of uart port 0 as consoleThomas Abraham
In s3c24xx_serial_console_setup function, if the uart port that is being setup as a console has not been initialized, an error can be returned instead of using uart port 0 as the default console port. The uart port that was intended to be used as a console could be initialized at a later point during boot and then registered as a console. This will avoid using uart port 0 as a unintended console port. Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
2011-07-05Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2011-07-04Merge branch 'at91/fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-2.6-arm-soc * 'at91/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-2.6-arm-soc: AT91: Change nand buswidth logic to match hardware default configuration at91: Use "pclk" as con_id on at91cap9 and at91rm9200 at91: fix udc, ehci and mmc clock device name for cap9/9g45/9rl atmel_serial: fix internal port num at91: fix at91_set_serial_console: use platform device id
2011-07-04tty/serial: change of_serial to use new of_property_read_u32() apiGrant Likely
Simplifies the code a bit and drops a few lines. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Arnd Bergmann <arnd@arndb.de>
2011-07-01tty: serial: samsung.c remove legacy PM code.MyungJoo Ham
This patch "modernize" tty/serial/samsung.c to use non-legacy code for suspend/resume. Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: KyungMin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-01SERIAL: SC26xx: Fix link error.Ralf Baechle
Kconfig allows enabling console support for the SC26xx driver even when it's configured as a module resulting in a: ERROR: "uart_console_device" [drivers/tty/serial/sc26xx.ko] undefined! modpost error since the driver was merged in eea63e0e8a60d00485b47fb6e75d9aa2566b989b [SC26XX: New serial driver for SC2681 uarts] in 2.6.25. Fixed by only allowing console support to be enabled if the driver is builtin. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: stable <stable@kernel.org> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-01serial: mrst_max3110: initialize waitqueue earlierMika Westerberg
The driver went to initialize its waitqueue at the start of the main processing thread. However, it is possible that this thread is not scheduled on a CPU before the write function is called which leads to a following error: BUG: spinlock bad magic on CPU#1, swapper/1 lock: f5f3ebdc, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Pid: 1, comm: swapper Not tainted 3.0.0-rc2+ #67 Call Trace: [<c1289663>] spin_bug+0xa3/0xf0 [<c12897ad>] do_raw_spin_lock+0x7d/0x150 [<c1490006>] ? init_idle+0x8d/0x20c [<c14963de>] _raw_spin_lock_irqsave+0x4e/0x60 [<c102f2bb>] ? __wake_up+0x1b/0x50 [<c102f2bb>] __wake_up+0x1b/0x50 [<c12d03bc>] ? uart_console_write+0x4c/0x60 [<c12d36c0>] ? serial_m3110_enable_ms+0x10/0x10 [<c12d3715>] serial_m3110_con_write+0x55/0x60 [<c1041575>] __call_console_drivers+0x75/0x90 [<c10415d9>] _call_console_drivers+0x49/0x80 [<c1041baa>] console_unlock+0xca/0x1f0 [<c10420ef>] vprintk+0x18f/0x4f0 [<c10787cb>] ? trace_hardirqs_on+0xb/0x10 [<c14928a3>] printk+0x18/0x1a [<c1042730>] register_console+0x2e0/0x350 [<c12d098e>] uart_add_one_port+0x33e/0x3d0 [<c10787cb>] ? trace_hardirqs_on+0xb/0x10 [<c103e10b>] ? try_to_wake_up+0x18b/0x250 [<c1485ba6>] serial_m3110_probe+0x1c2/0x1df [<c12d3d20>] ? serial_m3110_suspend+0x40/0x40 [<c1303db7>] spi_drv_probe+0x17/0x20 ... We fix this by initializing the waitqueue before the main thread is created. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-01mrst_max3110: Change max missing message priority.William Douglas
Change print message to notice instead of error to clean up non critcal messages showing on startup. The MAX3111 not being present is a normal path for end user systems. Signed-off-by: William Douglas <william.douglas@intel.com> [rebased on 3.0, switched to dev_dbg()] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-01tty: s5pv210: Add delay loop on fifo reset function for UARTJongpill Lee
This patch addes delay loop on fifo reset function for UART. On high speed freq, it needs delay function when fifo reset. If not, system will hang by this uart reset problem when resuming from suspend mode. Signed-off-by: Jongpill Lee <boyko.lee@samsung.com> Signed-off-by: Jaecheol Lee <jc.lee@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-01tty/serial: Fix XSCALE serial ports, e.g. ce4100Stephen Warren
Commit 4539c24fe4f92c09ee668ef959d3e8180df619b9 "tty/serial: Add explicit PORT_TEGRA type" introduced separate flags describing the need for IER bits UUE and RTOIE. Both bits are required for the XSCALE port type. While that patch updated uart_config[] as required, the auto-probing code wasn't updated to set the RTOIE flag when an XSCALE port type was detected. This caused such ports to stop working. This patch rectifies that. Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Stephen Warren <swarren@nvidia.com> Cc: stable <stable@kernel.org> [3.0] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-01serial: bfin_5xx: fix off-by-one with resource sizeMike Frysinger
This doesn't cause any real bugs, but it should still be fixed. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-30tty: of_serial: support for 32 bit accessesJamie Iles
Some platforms e.g. TI Davinci require 32-bit accesses to the UARTs. The of_serial driver currently registers all UARTs as UPIO_MEM. Add a new attribute "reg-io-width" to allow the port to be registered with different IO width requirements. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-06-28Merge branch 'tty-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 * 'tty-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: serial: bcm63xx_uart: fix irq storm after rx fifo overrun. amba pl011: platform data for reg lockup and glitch v2 amba pl011: workaround for uart registers lockup tty: n_gsm: improper skb_pull() use was leaking framed data tty: n_gsm: Fixed logic to decode break signal from modem status TTY: ntty, add one more sanity check TTY: ldisc, do not close until there are readers 8250: Fix capabilities when changing the port type 8250_pci: Fix missing const from merges ARM: SAMSUNG: serial: Fix on handling of one clock source for UART serial: ioremap warning fix for jsm driver. 8250_pci: add -ENODEV code for Intel EG20T PCH
2011-06-27drivers/tty/serial/8250_pci.c: fix warningAndrew Morton
Fis the warning drivers/tty/serial/8250_pci.c:1457: warning: initialization from incompatible pointer type Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-25atmel_serial: fix internal port numJean-Christophe PLAGNIOL-VILLARD
the atmel_ports is link to the console number and not the device id this was not detected on at91 as we always register the dbgu on the console as ttyS0 tested on at91sam9263 by setting the dbgu as ttyS1 and use as console diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 70e5646..9b8a14f 100644 - a/arch/arm/mach-at91/board-sam9263ek.c + b/arch/arm/mach-at91/board-sam9263ek.c @@ -58,14 +58,14 @@ static void __init ek_init_early(void) /* Initialize processor: 16.367 MHz crystal */ at91_initialize(16367660); - /* DBGU on ttyS0. (Rx & Tx only) */ - at91_register_uart(0, 0, 0); + /* DBGU on ttyS1. (Rx & Tx only) */ + at91_register_uart(0, 1, 0); - /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ - at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); + /* USART0 on ttyS0. (Rx, Tx, RTS, CTS) */ + at91_register_uart(AT91SAM9263_ID_US0, 0, ATMEL_UART_CTS | ATMEL_UART_RTS); - /* set serial console to ttyS0 (ie, DBGU) */ - at91_set_serial_console(0); + /* set serial console to ttyS1 (ie, DBGU) */ + at91_set_serial_console(1); } /* Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
2011-06-24treewide: transciever/transceiver spelling fixesJoe Perches
Just tyops. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-23serial: mrst_max3110: initialize waitqueue earlierMika Westerberg
The driver went to initialize its waitqueue at the start of the main processing thread. However, it is possible that this thread is not scheduled on a CPU before the write function is called which leads to a following error: BUG: spinlock bad magic on CPU#1, swapper/1 lock: f5f3ebdc, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Pid: 1, comm: swapper Not tainted 3.0.0-rc2+ #67 Call Trace: [<c1289663>] spin_bug+0xa3/0xf0 [<c12897ad>] do_raw_spin_lock+0x7d/0x150 [<c14963de>] _raw_spin_lock_irqsave+0x4e/0x60 [<c102f2bb>] __wake_up+0x1b/0x50 [<c12d3715>] serial_m3110_con_write+0x55/0x60 [<c1041575>] __call_console_drivers+0x75/0x90 [<c10415d9>] _call_console_drivers+0x49/0x80 [<c1041baa>] console_unlock+0xca/0x1f0 [<c10420ef>] vprintk+0x18f/0x4f0 [<c14928a3>] printk+0x18/0x1a [<c1042730>] register_console+0x2e0/0x350 [<c12d098e>] uart_add_one_port+0x33e/0x3d0 [<c1485ba6>] serial_m3110_probe+0x1c2/0x1df [<c1303db7>] spi_drv_probe+0x17/0x20 ... Fix this by initializing the waitqueue before the main thread is created. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-23mrst_max3110: Change max missing message priority.William Douglas
Change print message to notice instead of error to clean up non critical messages showing on startup. The MAX3111 not being present is a normal path for end user systems. Signed-off-by: William Douglas <william.douglas@intel.com> [rebased on 3.0, switched to dev_dbg()] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-21net: remove mm.h inclusion from netdevice.hAlexey Dobriyan
Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually). To prevent mm.h inclusion via other channels also extract "enum dma_data_direction" definition into separate header. This tiny piece is what gluing netdevice.h with mm.h via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h". Removal of mm.h from scatterlist.h was tried and was found not feasible on most archs, so the link was cutoff earlier. Hope people are OK with tiny include file. Note, that mm_types.h is still dragged in, but it is a separate story. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-16serial: bcm63xx_uart: fix irq storm after rx fifo overrun.Maxime Bizon
RX fifo reset is required to clear irq. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-16amba pl011: workaround for uart registers lockupShreshtha Kumar Sahu
This workaround aims to break the deadlock situation which raises during continuous transfer of data for long duration over uart with hardware flow control. It is observed that CTS interrupt cannot be cleared in uart interrupt register (ICR). Hence further transfer over uart gets blocked. It is seen that during such deadlock condition ICR don't get cleared even on multiple write. This leads pass_counter to decrease and finally reach zero. This can be taken as trigger point to run this UART_BT_WA. Workaround backups the register configuration, does soft reset of UART using BIT-0 of PRCC_K_SOFTRST_SET/CLEAR registers and restores the registers. This patch also provides support for uart init and exit function calls if present. Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-15drivers/tty/serial/pch_uart.c: don't oops if dmi_get_system_info returns NULLAlexander Stein
If dmi_get_system_info() returns NULL, pch_uart_init_port() will dereferencea a zero pointer. This oops was observed on an Atom based board which has no BIOS, but a bootloder which doesn't provide DMI data. Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Cc: Greg KH <gregkh@suse.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-06-10treewide: Convert uses of struct resource to resource_size(ptr)Joe Perches
Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-07serial: 8250, increase PASS_LIMITJiri Slaby
With virtual machines like qemu, it's pretty common to see "too much work for irq4" messages nowadays. This happens when a bunch of output is printed on the emulated serial console. This is caused by too low PASS_LIMIT. When ISR loops more than the limit, it spits the message. I've been using a kernel with doubled the limit and I couldn't see no problems. Maybe it's time to get rid of the message now? Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-078250_pci Add EEH support to the 8250 driver for IBM/Digi PCIe 2-port AdapterMichael Reed
The purpose of the patch is to add EEH support to the 8250_PCI driver for the IBM/Digi PCIE 2port Async EIA-232 Adapter that uses a PLX chipset on the PPC platforrm. Basic support for this adapter was recently added https://lkml.org/lkml/2011/5/11/341 This patch was created against the linux-next kernel Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Breno Leitao <leitao@linux.vnet.ibm.com> Cc: Scott Kilau <scottk@digi.com> Signed-off-by: Michael Reed <mreed@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07serial/pch: use global div helper instead of creating a private oneUwe Kleine-König
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07parport/serial: add support for Timedia/SUNIX cards to parport_serialFrédéric Brière
Timedia/SUNIX PCI cards with both serial and parallel ports are currently supported by 8250_pci and parport_pc individually. Moving that support into parport_serial allows using both types of ports at the same time. This was successfully tested with a SUNIX 4079T. Signed-off-by: Frédéric Brière <fbriere@fbriere.net> Acked-by: Alan Cox <alan@linux.intel.com> Cc: linux-serial@vger.kernel.org Cc: linux-parport@lists.infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07serial: 8250_pci: add .probe member to struct pci_serial_quirkFrédéric Brière
This function, if present, is called early on by the 8250_pci probe; it can be used to reject devices meant for parport_serial. (The .init function cannot be used for this purpose, as it is also called by parport_serial.) Signed-off-by: Frédéric Brière <fbriere@fbriere.net> Acked-by: Alan Cox <alan@linux.intel.com> Cc: linux-serial@vger.kernel.org Cc: linux-parport@lists.infradead.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07Basic support for Moschip 9900 family I/O chipsNicos Gollan
Add I/O based support for serial and parallel ports of the following chips: Vendor: Moschip (0x9710) Parts (device IDs) * 9900 (0x9900) * 9904 (0x9904 * 9901 (0x9912, also sold as 9912) * 9922 (0x9922) On all chips but the 9900, a single port is provided per PCI subdevice (subvendor-ID 0xA000, subdevice-IDs 0x1000 for serial, 0x2000 for parallel with proper class codes). In cascading configurations, the 9900 provides two devices per subdevice, with subvendor-ID 0xA000 and subdevice-IDs 0x30ps where p is the number of parallel ports and s the number of serial ports. Basic testing was only done on the serial part of a 9912 to the point where it can be used for a serial kernel console, and advanced features are completely untested. It is possible to reduce functionality of the chips by adding a configuration EEPROM, and the datasheet [1] is inconsistent w.r.t subdevices in the 4s+2s1p and 2s1p+4s configurations. The subdevice-ID 0x3012 should likely read 0x3011 with a serial port in function 3, which would be consistent with the BAR layouts. For now, the drivers ignore subdevices with ID 0x1000 and no class code. The parallel ports are integrated in parport_serial even for purely parallel parts to reduce the footprint of the patch. [1] http://www.moschip.com/data/products/MCS9900/MCS9900_Datasheet.pdf Signed-off-by: Nicos Gollan <gtdev@spearhead.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-078250: Fix capabilities when changing the port typeleitao@linux.vnet.ibm.com
When changing the port type, the capabilities flags should be changed also, otherwise the capabilities will not correspond to the port type, which make set_sleep() crash on rmmod. This patch just assign the correct capabilites when the port changes. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> CC: Michael Reed <mreed@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-078250_pci: Fix missing const from mergesAlan Cox
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Antony Pavlov <antony@niisi.msk.ru> Signed-off-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07ARM: SAMSUNG: serial: Fix on handling of one clock source for UARTBoojin Kim
This patch fixes the way of comparison for handling of two or more clock sources for UART. For example, if just only one clock source is defined even though there are two clock sources for UART, the serial driver does not set proper clock up. Of course, it is problem. So this patch changes the condition of comparison to avoid useless setup clock and adds a flag 'NO_NEED_CHECK_CLKSRC' which means selection of source clock is not required. In addition, since the Exynos4210 has only one clock source for UART this patch adds the flag into its common_init_uarts(). Signed-off-by: Boojin Kim <boojin.kim@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07serial: ioremap warning fix for jsm driver.Lennart Sorensen
I saw a warning about ioremap from the jsm driver on a system which looked like this: resource map sanity check conflict: 0xe0200800 0xe02017ff 0xe0200800 0xe0200fff 0000:01:08.0 Turns out the warning is valid. The jsm driver has been asking to ioremap 0x1000 forever, but in fact only 8 port chips have 0x1000 bytes of memory. 4 port chips have 0x800 and 2 port chips have 0x400 according to the data sheet. It makes more sense to map the size of the region rather than a hard coded value. If you happen to have the region legitimately mapped to a base address that is not 4K aligned, ioremap complains otherwise. Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>