summaryrefslogtreecommitdiffstats
path: root/drivers/tty
Commit message (Collapse)AuthorAgeFilesLines
* TTY: let alloc_tty_driver deduce the owner automaticallyJiri Slaby2012-03-081-2/+3
| | | | | | | | | | | | | Like the rest of the kernel, make a stub from alloc_tty_driver which calls __alloc_tty_driver with proper owner. This will save us one more assignment on the driver side. Also this fixes some drivers which didn't set the owner. This allowed user to remove the module from the system even though a tty from the driver is still open. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* TTY: tty_io, remove buffer re-assignmentsJiri Slaby2012-03-081-1/+0Star
| | | | | | | | | TTY buffer head and tail are initialized in tty_buffer_init. No need to do it once again in initialize_tty_struct where tty_buffer_init is called. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: tackle the main part of the selection logicAlan Cox2012-03-082-8/+33
| | | | | | | | We leave the existing paste mess alone and just fix up the vt side of things. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: waitevent is self locked so drop the tty_lockAlan Cox2012-03-081-9/+2Star
| | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: push down tioclinux casesAlan Cox2012-03-083-8/+18
| | | | | | | | Some of this ventures into selection which is still a complete lost cause. We are not making it any worse. It's completely busted anyway. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: push down the tty lock so we can see what is left to tackleAlan Cox2012-03-082-37/+59
| | | | | | | | | | | | | At this point we have the tty_lock guarding a couple of oddities, plus the translation and unimap still. We also extend the console_lock in a couple of spots where coverage is wrong and switch vcs_open to use the right lock ! [Fixed the locking issue Jiri reported] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: sort out locking for font handlingAlan Cox2012-03-081-10/+13
| | | | | | | | The font methods are console_lock covered. Unfortunately they don't extend the lock over all the needed tests. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: cyclades: TIOCSERGETLSR should should store to a uintDan Carpenter2012-03-081-1/+1
| | | | | | | | | | TIOCSERGETLSR should be saved in a uint so the cast here to unsigned long is a bug. Reported-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: serial: OMAP: Fix oops due to NULL pdata in DT bootCousson, Benoit2012-03-081-3/+3
| | | | | | | | | | | | | | The following commit: be4b0281956c5cae4f63f31f11d07625a6988766 (tty: serial: OMAP: block idle while the UART is transferring data in PIO mode), is introducing an oops if OMAP is booted using device tree blob because the pdata will not be initialized. Check if pdata is set before de-referencing it. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Reviewed-by: Paul Walmsley <paul@pwsan.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt:tackle kbd_tableAlan Cox2012-03-085-359/+629
| | | | | | | | | | | | | | | | | | | | | Keyboard struct lifetime is easy, but the locking is not and is completely ignored by the existing code. Tackle this one head on - Make the kbd_table private so we can run down all direct users - Hoick the relevant ioctl handlers into the keyboard layer - Lock them with the keyboard lock so they don't change mid keypress - Add helpers for things like console stop/start so we isolate the poking around properly - Tweak the braille console so it still builds There are a couple of FIXME locking cases left for ioctls that are so hideous they should be addressed in a later patch. After this patch the kbd_table is private and all the keyboard jiggery pokery is in one place. This update fixes speakup and also a memory leak in the original. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: keyboard.c: add uaccess.h to fix a build problem on sparc32Greg Kroah-Hartman2012-02-281-0/+1
| | | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: tidy a few bits of checkpatch noiseAlan Cox2012-02-241-9/+9
| | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* vt: lock the accent tableAlan Cox2012-02-242-78/+165
| | | | | | | | | | | | First step to debletcherising the vt console layer - pick a victim and fix the locking This is a nice simple object with its own rules so lets pick it out for treatment. The user of the table already has a lock so we will also use the same lock for updates. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "TTY: pty, remove superfluous ptm test"Greg Kroah-Hartman2012-02-241-1/+4
| | | | | | | | | | | This reverts commit a50f724a432997321cabb6c9e665c28e34850f78. Sasha reported that this causes problems, so revert it. Cc: Alan Cox <alan@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Sasha Levin <levinsasha928@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "TTY: get rid of BTM around devpts_*"Greg Kroah-Hartman2012-02-242-3/+5
| | | | | | | | | | This reverts commit d3bda5298aad98c7a27678bdd0dd9d008ab9e685. Sasha reported that this causes problems, so revert it. Cc: Sasha Levin <levinsasha928@gmail.com> Cc: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* amba-pl011​/dma: Add check for the residue in DMA callbackChanho Min2012-02-241-1/+16
| | | | | | | | | | | | In DMA-operated uart, I found that rx data can be taken by the UART interrupts during the DMA irq handler. pl011_int is occurred just before it goes inside spin_lock_irq. When it returns to the callback, DMA buffer already has been flushed. Then, pl011_dma_rx_chars gets invalid data. So I add check for the residue as the patch bellow. Signed-off-by: Chanho Min <chanho.min@lge.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: samsung: fix s3c2442 platform dataDenis 'GNUtoo' Carikli2012-02-241-1/+1
| | | | | | | | | | | | | | | Without that fix machines having a s3c2442 CPU have something like that in dmesg: samsung-uart s3c2440-uart.0: could not find driver data samsung-uart s3c2440-uart.1: could not find driver data samsung-uart s3c2440-uart.2: could not find driver data And serial is never initialized. The previous log was obtained trough early printk on the gta02 machine. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty/powerpc: early udbg consoles can't be modulesStephen Rothwell2012-02-241-1/+1
| | | | | | | | | | | | | Fixes these build errors: ERROR: ".udbg_printf" [drivers/tty/ehv_bytechan.ko] undefined! ERROR: ".register_early_udbg_console" [drivers/tty/ehv_bytechan.ko] undefined! ERROR: "udbg_putc" [drivers/tty/ehv_bytechan.ko] undefined! Cc: Timur Tabi <timur@freescale.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: Fix typo in sn_console.cMasanari Iida2012-02-241-2/+2
| | | | | | | | Correct spelling "receieve" to "receive" in drivers/tty/serial/sn_console.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty/serial/mux.c: linux/tty.h included twiceDanny Kukawka2012-02-241-1/+0Star
| | | | | | | | drivers/tty/serial/mux.c included 'linux/tty.h' twice, remove the duplicate. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.hPaul Gortmaker2012-02-107-44/+8Star
| | | | | | | | | | | There are multiple users of this file from different source paths now, and rather than have ../ paths in include statements, just move the file to the linux header dir. Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'tty-3.3-rc3' tty-nextGreg Kroah-Hartman2012-02-1024-193/+1020
|\ | | | | | | | | | | | | This is needed to handle the 8250 file merge mess properly for future patches. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * tty: serial: altera_uart: Add CONSOLE_POLL supportTobias Klauser2012-02-092-1/+25
| | | | | | | | | | | | | | This allows altera_uart to be used for KGDB debugging over serial line. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * tty: serial: altera_uart: remove early_altera_uart_setupTobias Klauser2012-02-091-23/+0Star
| | | | | | | | | | | | | | | | The function has no users inside the tree and the nios2 (out-of-mainline) port doesn't use it either (anymore). Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * sysrq: Properly check for kernel threadsAnton Vorontsov2012-02-091-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | There's a real possibility of killing kernel threads that might have issued use_mm(), so kthread's mm might become non-NULL. This patch fixes the issue by checking for PF_KTHREAD (just as get_task_mm()). Suggested-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * sysrq: Fix possible race with exiting taskAnton Vorontsov2012-02-091-0/+2
| | | | | | | | | | | | | | | | | | | | sysrq should grab the tasklist lock, otherwise calling force_sig() is not safe, as it might race with exiting task, which ->sighand might be set to NULL already. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: trivail cleanup by removing the pch_uart_hal_request()Feng Tang2012-02-091-13/+3Star
| | | | | | | | | | | | | | | | | | pch_uart_hal_request() has parameters which it never uses, also it is very short, so merge it with its caller to make code cleaner. No functional changes at all. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: trivial cleanup by removing the get_msr()Feng Tang2012-02-091-21/+8Star
| | | | | | | | | | | | | | | | | | The short get_msr() has some unnecessary code and only used once, so merge it with its caller to make code cleaner. No functional change at all. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: pch_uart: add debugfs hook for register dumpFeng Tang2012-02-091-0/+84
| | | | | | | | | | | | | | | | | | This driver will be use as interfaces for multiple kinds of devices like Bluetooth/GPS etc, this debug hook will make driver debugging much easier. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * TTY: get rid of BTM around devpts_*Jiri Slaby2012-02-032-5/+3Star
| | | | | | | | | | | | | | | | devpts operations are protected by inode mutexes and dentry refcounting. There is no need to hold BTM. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * TTY: pty, remove superfluous ptm testJiri Slaby2012-02-031-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code looks like: if (tty->driver->subtype == PTY_TYPE_MASTER) { ... if (tty->driver == ptm_driver) But the second if is superfluous because only the ptm_driver is of PTY_TYPE_MASTER subtype. Also we can remove the #if now because devpts_pty_kill is defined as an empty function for non-CONFIG_UNIX98_PTYS configs. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * TTY: use tty_standard_installJiri Slaby2012-02-031-6/+2Star
| | | | | | | | | | | | | | | | | | Use the helper in the rest of the tty drivers. This is a simple replacement. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * TTY: provide tty_standard_install helperJiri Slaby2012-02-021-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | There are currently many cut&paste copies of what tty_driver_install_tty does when custom ->install method is not provided. Let's get rid of the copies and create a helper with this setup code. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Havard Skinnemoen <hskinnemoen@google.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * tty: serial: omap-serial: wakeup latency constraint is in microseconds, not ↵Paul Walmsley2012-02-021-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | milliseconds The receive FIFO wakeup latency estimate in the omap-serial driver is three orders of magnitude too small. This effectively prevents the MPU from going to a low-power state when CONFIG_CPU_IDLE=y. This is a major power management regression and masks some other FIFO-related bugs in the driver. Fix by correcting the most egregious problem in the RX wakeup latency estimate. There are several other flaws in the estimator; these will be fixed by a separate patch series intended for 3.4. The difference in low-power states with this patch can be observed via debugfs in pm_debug/count. This estimate does not have any effect when CONFIG_CPU_IDLE=n. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Alan Cox <alan@linux.intel.com> Acked-by: Govindraj.R <govindraj.raja@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * tty: serial: OMAP: block idle while the UART is transferring data in PIO modePaul Walmsley2012-02-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent OMAP UARTs from going idle while they are still transferring data in PIO mode. This works around an oversight in the OMAP UART hardware present in OMAP34xx and earlier: an idle UART won't send a wakeup when the TX FIFO threshold is reached. This causes long delays during data transmission when the MPU powerdomain enters a low-power mode. The MPU interrupt controller is not able to respond to interrupts when it's in a low-power state, so the TX buffer is not refilled until another wakeup event occurs. This fix changes the erratum i291 DMA idle workaround. Rather than toggling between force-idle and no-idle, it will toggle between smart-idle and no-idle. The important part of the workaround is the no-idle part, so this shouldn't result in any change in behavior. This fix should work on all OMAP UARTs. Future patches intended for the 3.4 merge window will make this workaround conditional on a "feature" flag, and will use the OMAP36xx+ TX event wakeup support. Thanks to Kevin Hilman <khilman@ti.com> for mentioning the erratum i291 workaround, which led to the development of this approach. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Govindraj.R <govindraj.raja@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * tty: serial: OMAP: use a 1-byte RX FIFO threshold in PIO modePaul Walmsley2012-02-021-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the (default) PIO mode, use a one-byte RX FIFO threshold. The OMAP UART IP blocks do not appear to be capable of waking the system under an RX timeout condition. Since the previous RX FIFO threshold was 16 bytes, this meant that omap-serial.c did not become aware of any received data until all those bytes arrived or until another UART interrupt occurred. This made the serial console and presumably other serial applications (GPS, serial Bluetooth) unusable or extremely slow. A 1-byte RX FIFO threshold also allows the MPU to enter a low-power consumption state while waiting for the FIFO to fill. This can be verified using the serial console by comparing the behavior when "0123456789abcde" is pasted in from another window, with the behavior when "0123456789abcdef" is pasted in. Since the former string is less than sixteen bytes long, the string is not echoed for some time, while the latter string is echoed immediately. DMA operation is unaffected by this patch. Thanks to Russell King - ARM Linux <linux@arm.linux.org.uk> for some additional information on the standard behavior of the RX timeout event, which was used to improve this commit description. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Govindraj Raja <govindraj.r@ti.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Russell King <linux@arm.linux.org.uk> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: Kill off NO_IRQAlan Cox2012-01-2715-44/+30Star
| | | | | | | | | | | | | | | | | | | | | | | | We transform the offenders into a test of irq <= 0 which will be ok while the ARM people get their platform sorted. Once that is done (or in a while if they don't do it anyway) then we will change them all to !irq checks. For arch specific drivers that are already using NO_IRQ = 0 we just test against zero so we don't need to re-review them later. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * serial/efm32: add new driverUwe Kleine-König2012-01-263-0/+844
| | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * tty: move pty count limiting into devptsKonstantin Khlebnikov2012-01-241-51/+0Star
| | | | | | | | | | | | | | | | Let's move this stuff to the better place, where we can account pty right in tty-indexes managing code. Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * tty: cleanup prohibition of direct opening for unix98 pty masterKonstantin Khlebnikov2012-01-242-15/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cleanup hack added in v2.6.27-3203-g15582d3 comment from that patch: : pty: If the administrator creates a device for a ptmx slave we should not error : : The open path for ptmx slaves is via the ptmx device. Opening them any : other way is not allowed. Vegard Nossum found that previously this was not : the case and mknod foo c 128 42; cat foo would produce nasty diagnostics : : Signed-off-by: Alan Cox <alan@redhat.com> : Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> devpts_get_tty() returns non-null only for inodes on devpts, but there is no inodes for master-devices, /dev/ptmx (/dev/pts/ptmx) is the only way to open them. Thus we can completely forbid lookup for master-devices and eliminate that hack in tty_init_dev() because tty_open() will get EIO from tty_driver_lookup_tty(). Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | tty: serial: omap-serial: wakeup latency constraint is in microseconds, not ↵Paul Walmsley2012-02-091-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | milliseconds The receive FIFO wakeup latency estimate in the omap-serial driver is three orders of magnitude too small. This effectively prevents the MPU from going to a low-power state when CONFIG_CPU_IDLE=y. This is a major power management regression and masks some other FIFO-related bugs in the driver. Fix by correcting the most egregious problem in the RX wakeup latency estimate. There are several other flaws in the estimator; these will be fixed by a separate patch series intended for 3.4. The difference in low-power states with this patch can be observed via debugfs in pm_debug/count. This estimate does not have any effect when CONFIG_CPU_IDLE=n. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Alan Cox <alan@linux.intel.com> Acked-by: Govindraj.R <govindraj.raja@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | tty: serial: OMAP: block idle while the UART is transferring data in PIO modePaul Walmsley2012-02-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent OMAP UARTs from going idle while they are still transferring data in PIO mode. This works around an oversight in the OMAP UART hardware present in OMAP34xx and earlier: an idle UART won't send a wakeup when the TX FIFO threshold is reached. This causes long delays during data transmission when the MPU powerdomain enters a low-power mode. The MPU interrupt controller is not able to respond to interrupts when it's in a low-power state, so the TX buffer is not refilled until another wakeup event occurs. This fix changes the erratum i291 DMA idle workaround. Rather than toggling between force-idle and no-idle, it will toggle between smart-idle and no-idle. The important part of the workaround is the no-idle part, so this shouldn't result in any change in behavior. This fix should work on all OMAP UARTs. Future patches intended for the 3.4 merge window will make this workaround conditional on a "feature" flag, and will use the OMAP36xx+ TX event wakeup support. Thanks to Kevin Hilman <khilman@ti.com> for mentioning the erratum i291 workaround, which led to the development of this approach. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Govindraj.R <govindraj.raja@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | tty: serial: OMAP: use a 1-byte RX FIFO threshold in PIO modePaul Walmsley2012-02-091-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the (default) PIO mode, use a one-byte RX FIFO threshold. The OMAP UART IP blocks do not appear to be capable of waking the system under an RX timeout condition. Since the previous RX FIFO threshold was 16 bytes, this meant that omap-serial.c did not become aware of any received data until all those bytes arrived or until another UART interrupt occurred. This made the serial console and presumably other serial applications (GPS, serial Bluetooth) unusable or extremely slow. A 1-byte RX FIFO threshold also allows the MPU to enter a low-power consumption state while waiting for the FIFO to fill. This can be verified using the serial console by comparing the behavior when "0123456789abcde" is pasted in from another window, with the behavior when "0123456789abcdef" is pasted in. Since the former string is less than sixteen bytes long, the string is not echoed for some time, while the latter string is echoed immediately. DMA operation is unaffected by this patch. Thanks to Russell King - ARM Linux <linux@arm.linux.org.uk> for some additional information on the standard behavior of the RX timeout event, which was used to improve this commit description. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Govindraj Raja <govindraj.r@ti.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Russell King <linux@arm.linux.org.uk> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | m32r: relocate drivers back out of 8250 dirPaul Gortmaker2012-02-093-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 9bef3d4197379a995fa80f81950bbbf8d32e9e8b "serial: group all the 8250 related code together" inadvertently swept up the m32r driver in the move, because it had comments mentioning 8250 registers within it. However these are only there by nature of the driver being based off the 8250 source code -- the hardware itself does not actually have any relation to the original 8250 style UARTs. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | tty: fix a build failure on sparcCong Wang2012-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On sparc, there is a build failure: drivers/tty/serial/8250/8250.c:48:21: error: suncore.h: No such file or directory drivers/tty/serial/8250/8250.c:3275: error: implicit declaration of function 'sunserial_register_minors' drivers/tty/serial/8250/8250.c:3305: error: implicit declaration of function 'sunserial_unregister_minors' this is due to commit 9bef3d4197379a995fa80f81950bbbf8d32e9e8b (serial: group all the 8250 related code together) moved these files into 8250/ subdirectory, but forgot to change the reference to drivers/tty/serial/suncore.h. Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: samsung: Add support for EXYNOS5250Kukjin Kim2012-02-031-1/+1
| | | | | | | | | | | | | | Cc: Thomas Abraham <thomas.abraham@linaro.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: samsung: Add support for EXYNOS4212 and EXYNOS4412Kukjin Kim2012-02-031-1/+2
| | | | | | | | | | | | | | | | | | | | This should be added for EXYNOS4212 and EXYNOS4412 SoCs. Cc: Thomas Abraham <thomas.abraham@linaro.org> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | drivers/tty/vt/vt_ioctl.c: fix KDFONTOP 32bit compatibility layerSamuel Thibault2012-02-031-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KDFONTOP(GET) currently fails with EIO when being run in a 32bit userland with a 64bit kernel if the font width is not 8. This is because the compatibility layer introduced by e9216651 ("tty: handle VT specific compat ioctls in vt driver") forces the addition of the KD_FONT_FLAG_OLD flag, which makes con_font_get return EIO in such case. This flag should *not* be set for KDFONTOP, since it's actually the whole point of this flag (see comment in con_font_set for instance). Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Arthur Taylor <art@ified.ca> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Jiri Olsa <jolsa@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: Kill off Moorestown codeAlan Cox2012-01-263-354/+0Star
| | | | | | | | | | | | | | | | | | All production devices operate in the Oaktrail configuration with legacy PC elements present and an ACPI BIOS. Continue stripping out the Moorestown elements from the tree leaving Medfield. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Revert "tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode"Greg Kroah-Hartman2012-01-261-31/+4Star
| | | | | | | | | | | | | | | | | | | | | | This reverts commit 0a697b22252c9d7208b5fb3e9fbd124dd229f1d2 as Paul wants to rework it. Cc: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Govindraj Raja <govindraj.r@ti.com> Cc: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>