summaryrefslogtreecommitdiff
path: root/drivers/tty
AgeCommit message (Collapse)Author
2012-11-16serial: sh-sci: fix common SCIFB regmap definitionTakashi Yoshii
About FIFO count, there are two variants of SCIFs which show a) TX count in upper, RX count in lower byte of FDR register b) TX count in TFDR register, RX count in RFDR register Common SCIFB regmap in current source code is defined as "a". At least 7372 and 73a0 HW manual say their SICFB are "b". This patch alters the definition to "b", considering the current one has come from a mistake. The reason is as follows. The flag SCIFB sh-sci driver means it has 256 byte FIFO. The count is from 0(empty) to 256(full), that makes 9-bit. Because FDR is 16-bit register, it can not hold two 9-bits. That's why, SCIFB can not be "a". Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: sh-sci: mask SCTFDR/RFDR according to fifosizeTakashi Yoshii
Current mask 0xff to SCTFDR/RFDR damages SCIFB, because the registers on SCIFB have 9-bit data (0 to 256). This patch changes the mask according to port->fifosize. Though I'm not sure if the mask is really needed (I don't know if there are variants which have non-zero upper bits), it is safer. Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: sh-sci: support lower baud rateTakashi Yoshii
Support prescaler 1/16 and 1/64, in addition to current 1 and 1/4. Supporting below 2400bps was dropped long time ago in mainline. Since then, setting lower rate has been resulting in erroneous register value, without indicating any errors through API. This patch adds more prescaler to support lower rates again. This still doesn't check range, but we won't hit the case because even 50bps at 48MHz clock is now supported. Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: sh-sci: fix condition test to set SCBRRTakashi Yoshii
SCBRR == 0 is valid value (divide by 1). Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: sh-sci: console runtime PM support (revisit)Teppei Kamijou
The commit 1ba7622094 (serial: sh-sci: console Runtime PM support, from Magnus Damm <damm@opensource.se>, 2011-08-03), tried to support console runtime PM, but unfortunately it didn't work for us for some reason. We did not investigated further at that time, instead would like to propose a different approach. In Linux tty/serial world, to get console PM work properly, a serial client driver does not have to maintain .runtime_suspend()/..resume() calls itself, but can leave console power power management handling to the serial core driver. This patch moves the sh-sci driver in that direction. Notes: * There is room to optimize console runtime PM more aggressively by maintaining additional local runtime PM calls, but as a first step having .pm() operation would suffice. * We still have a couple of direct calls to sci_port_enable/..disable left in the driver. We have to live with them, because they're out of serial core's help. Signed-off-by: Teppei Kamijou <teppei.kamijou.yb@renesas.com> Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16Partially revert "serial: sh-sci: console Runtime PM support"Shinya Kuribayashi
This partially reverts commit 1ba7622094 (serial: sh-sci: console Runtime PM support, from Magnus Damm <damm@opensource.se>, 2011-08-03). The generic 'serial_core' can take care of console PM maintenance, so all (or at least the first thing) we have to do to get console PM work properly, is to implement uart_ops ->pm() operation in the sh-sci serial client driver. This patch partially reverts the commit above, but leaving sci_reset() change in place, because sci_reset() is already part of another commit (73c3d53f38 serial: sh-sci: Avoid FIFO clear for MCE toggle.). A revised version of console PM support follows next. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16Revert "sh-sci / PM: Use power.irq_safe"Shinya Kuribayashi
This reverts commit 5a50a01bf0 (sh-sci / PM: Use power.irq_safe, from Rafael J. Wysocki <rjw@sisk.pl>, 2011-08-24). In order to get console PM work properly, we should implement uart_ops ->pm() operation, rather than sprinkle band-ading runtime PM calls in the driver. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16Revert "sh-sci / PM: Avoid deadlocking runtime PM"Shinya Kuribayashi
This reverts commit 048be431e4 (sh-sci / PM: Avoid deadlocking runtime PM, from Rafael J. Wysocki <rjw@sisk.pl>, 2012-03-09). In order to get console PM work properly, we should implement uart_ops ->pm() operation, rather than sprinkle band-ading runtime PM calls in the driver. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16TTY: call tty_port_destroy in the rest of driversJiri Slaby
After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. To be sure, the TTY buffers (and later some stuff) are gone along with the tty_port, we have to call tty_port_destroy at tear-down places. This is mostly where the structure containing a tty_port is freed. This patch does exactly that -- put tty_port_destroy at those places. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16TTY: isicom, fix tty buffers memory leakJiri Slaby
After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. This one is special as we need more work to be done. Previously, the tty_port was initialized at module load time, but to be able to destroy the port and init it again, we now do the initialization in probe and destroy in remove. I.e. at more appropriate places for that. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16TTY: introduce tty_port_destroyJiri Slaby
After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. Those using refcounting are safe now, but for those which do not we introduce a function to be called right before the tty_port is freed by the drivers. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16TTY: n_gsm, use kref from tty_portJiri Slaby
After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. Here it is enough to switch to refcounting in tty_port. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16TTY: pty, fix tty buffers leakJiri Slaby
After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. PTY is one of those, here we just need to use tty_port_put instead of kfree. (Assuming tty_port_destructor does not need port->ops to be set which we change here too.) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16TTY: isicom, stop using port->ttyJiri Slaby
Do not access unsafe port->tty pointer when we have a safe tty already. Use the safe one. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16tty/serial/ar933x_uart: fix baud rate calculationGabor Juhos
The UART of the AR933x SoC implements a fractional divisor for generating the desired baud rate. The current code uses a fixed value for the fractional part of the divisor, and this leads to improperly calculated baud rates: baud scale step real baud diff 300 5207* 8192 17756 17456 5818.66% 600 2603* 8192 35511 34911 5818.50% 1200 1301* 8192 71023 69823 5818.58% 2400 650* 8192 11241 8841 368.37% 4800 324* 8192 22645 17845 371.77% 9600 161 8192 9645 45 0.46% 14400 107 8192 14468 68 0.47% 19200 80 8192 19290 90 0.46% 28800 53 8192 28935 135 0.46% 38400 39 8192 39063 663 1.72% 57600 26 8192 57870 270 0.46% 115200 12 8192 120192 4992 4.33% 230400 5 8192 260417 30017 13.02% 460800 2 8192 520833 60033 13.02% 921600 0 8192 1562500 640900 69.93% After the patch, the integer and fractional parts of the divisor will be calculated dynamically. This ensures that the UART will use correct baud rates: baud scale step real baud diff 300 6 11 300 0 0.00% 600 54 173 600 0 0.00% 1200 30 195 1200 0 0.00% 2400 30 390 2400 0 0.00% 4800 48 1233 4800 0 0.00% 9600 78 3976 9600 0 0.00% 14400 98 7474 14400 0 0.00% 19200 55 5637 19200 0 0.00% 28800 130 19780 28800 0 0.00% 38400 36 7449 38400 0 0.00% 57600 78 23857 57600 0 0.00% 115200 43 26575 115200 0 0.00% 230400 23 28991 230400 0 0.00% 460800 11 28991 460800 0 0.00% 921600 5 28991 921599 -1 0.00% Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16mm, oom: ensure sysrq+f always passes valid zonelistDavid Rientjes
With hotpluggable and memoryless nodes, it's possible that node 0 will not be online, so use the first online node's zonelist rather than hardcoding node 0 to pass a zonelist with all zones to the oom killer. Signed-off-by: David Rientjes <rientjes@google.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: Unneeded ARCH dependencies are removedAlexander Shiyan
This patch performs a small cleanup tty/Serial/Kconfig file by removing unneeded ARCH dependencies. This dependencies already included in board/type symbols. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: mfd: Add nmi_touch_watchdog() into the console write functionFeng Tang
This is following what 8250 driver is doing in console write function, to avoid the hardware lockup case. v2: incldudes the <linux/nmi.h> Signed-off-by: Feng Tang <feng.tang@intel.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: bfin-uart: avoid dead lock in rx irq handler in smp kernelSteven Miao
Disabing dma irq and lock bottom half in smp kernel doesn't ensure exclusive uart access. Call spin_lock_irqsave() instead. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: cast before shifting on port ioAlan Cox
Without this we will shift data into oblivion and give wrong results on some configurations Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: xilinx_uartps: kill CONFIG_OF conditionalJosh Cartwright
The Zynq platform requires the use of CONFIG_OF. Remove the #ifdef conditionals in the uartps driver. Make dependency explicit in Kconfig. Signed-off-by: Josh Cartwright <josh.cartwright@ni.com> Tested-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16ipwireless: don't oops if we run out of spaceAlan Cox
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=49851 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16moxa: dcd handling of CLOCAL is backwardsAlan Cox
We should do hangup on dcd loss if CLOCAL is false not true. Signed-off-by: Alan Cox <alan@linux.intel.com> Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=49911 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial: ifx6x60: ifx_spi_write don't need to do mrdy_assert when fifo is not ↵Jun Chen
empty This patch check whether the fifo lenth is empty before writing new data to fifo.If condition is true,ifx_spi_write need to trigger one mrdy_assert. If condition is false,the mrdy_assert will be trigger by the next ifx_spi_io. Cc: Bi Chao <chao.bi@intel.com> Signed-off-by: Chen Jun <jun.d.chen@intel.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-16serial:ifx6x60:SPI header is decoded incorrectlychao bi
This patch is to correct the bit mapping of "MORE" and "CTS" in SPI frame header. Per SPI protocol, SPI header is encoded with length of 4 byte, which is defined as below: bit 0 ~ 11: current data size; bit 12: "MORE" bit; bit 13: reserve bit 14 ~ 15: reserve bit 16 ~ 27: next data size bit 28: RI bit 29: DCD bit 30: CTS/RTS bit 31: DSR/DTR According to above SPI header structure, the bit mapping of "MORE" and "CTS" is incorrect in function ifx_spi_decode_spi_header(); Cc: Chen Jun <jun.d.chen@intel.com> Signed-off-by: channing <chao.bi@intel.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-14tty: serial: max310x: Add terminating entry for spi_device_id tableAxel Lin
The spi_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-14TTY: hvc_console, fix port reference count going to zero prematurelyPaul Mackerras
Commit bdb498c20040 "TTY: hvc_console, add tty install" took the port refcounting out of hvc_open()/hvc_close(), but failed to remove the kref_put() and tty_kref_put() calls in hvc_hangup() that were there to remove the extra references that hvc_open() had taken. The result was that doing a vhangup() when the current terminal was a hvc_console, then closing the current terminal, would end up calling destroy_hvc_struct() and making the port disappear entirely. This meant that Fedora 17 systems would boot up but then not display the login prompt on the console, and attempts to open /dev/hvc0 would give a "No such device" error. This fixes it by removing the extra kref_put() and tty_kref_put() calls. Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-12Merge tag 'for-3.8-at91_header_clean' of ↵Arnd Bergmann
git://github.com/at91linux/linux-at91 into next/headers From Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>: arm: at91: mach header cleanup This first patch serie start the cleanup of the header in mach by moving all the platform data to include/linux/platform_data and move the board header and drivers header next to them * tag 'for-3.8-at91_header_clean' of git://github.com/at91linux/linux-at91: arm: at91: move at91rm9200 rtc header in drivers/rtc arm: at91: move reset controller header to arm/arm/mach-at91 arm: at91: move pit define to the driver arm: at91: move at91_shdwc.h to arch/arm/mach-at91 arm: at91: move board header to arch/arm/mach-at91 arn: at91: move at91_tc.h to arch/arm/mach-at91 arm: at91 move at91_aic.h to arch/arm/mach-at91 arm: at91 move board.h to arch/arm/mach-at91 arm: at91: move platfarm_data to include/linux/platform_data/atmel.h arm: at91: drop machine defconfig Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2012-11-11Merge branch 'at91' into develLinus Walleij
2012-11-06arm: at91: move platfarm_data to include/linux/platform_data/atmel.hJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
2012-11-04SERIAL: omap: fix hardware assisted flow controlRussell King
When the UART device has hardware flow control enabled, it ignores the MCR RTS bit in the MCR register, and keeps RTS asserted as long as we continue to read characters from the UART receiver FIFO. This means that when the TTY buffers become full, the UART doesn't tell the remote end to stop sending, which causes the TTY layer to start dropping characters. A similar problem exists with software flow control. We need the FIFO register to fill when software flow control is enabled to provoke the UART to send the XOFF character. Fix this by implementing the throttle/unthrottle callbacks, and use these to disable receiver interrupts. This in turn means that the UART FIFO will fill, which will then cause the UART's hardware to deassert the RTS signal and/or send the XOFF character, stopping the remote end. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: simplify (2)Russell King
Simplify: - set ECB ... - LCR mode A - clear TCRTLR - LCR mode B - clear ECB - set ECB and update other bits - LCR mode A - update XONANY to: - set ECB ... - LCR mode B - set ECB and update other bits - LCR mode A - update XONANY and clear TCRTLR Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: move xon/xoff setting earlierRussell King
Take advantage of the switch to mode B for accessing the TCR register, and move the xon/xoff configuration there. This allows further simplication of this sequence. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: always set TCRRussell King
We always setup the TCR register in the software flow control path, and when hardware flow control is enabled. Remove this redundant setup, and place it before we setup any hardware flow control. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: simplifyRussell King
We have the sequence: - LCR mode B - write EFR with ECB clear - LCR mode normal - if s/w flow - LCR mode B - write EFR with ECB clear ... - LCR mode B - write EFR with ECB clear - LCR mode normal This can be simplified to: - if s/w flow - LCR mode B - write EFR with ECB clear ... - LCR mode B - write EFR with ECB clear - LCR mode normal Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: don't read back LCR/MCR/EFRRussell King
There's really no reason to read back these registers while setting the termios modes, provided we keep our cached copies up to date. Remove these readbacks. This has the benefit that we know that the EFR_ECB and MCR_TCRTLR bits will always be clear, so we don't need to keep masking these bits throughout the code. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: serial_omap_configure_xonxoff() contents into set_termiosRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: configure xon/xoff before setting modem control linesRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: move driver private definitions and structures to driverRussell King
struct uart_omap_port and struct uart_omap_dma, and associated definitions are private to the driver, so there's no point them sitting in an include file under arch/arm. Move them into the driver itself. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: remove 'irq_pending' bitfieldRussell King
irq_pending is never used, so let's remove it. It seems to be result of a bad rebase of d37c6cebcb0c (serial: omap: move uart_omap_port definition to C file) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: fix MCR TCRTLR bit handlingRussell King
The MCR TCRTLR bit can only be changed when ECB is set in the EFR. Unfortunately, several places were trying to alter this bit while ECB was clear: - serial_omap_configure_xonxoff() was attempting to clear the bit after explicitly clearing the ECB bit. - serial_omap_set_termios() was trying the same trick after setting the SCR, and when trying to change the TCR register when hardware flow control was enabled. Fix this by ensuring that we always have ECB set whenever the TCRTLR bit is changed. Moreover, we start out by reading the EFR and MCR registers, which may have indeterminent bit settings for the ECB and TCRTLR bits. Ensure that these bits always start off in a known state. In order to avoid any undesired behaviour appearing through fixing this, we also ensure that hardware assisted flow control is disabled while new driver specific parts are not in place. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: fix set_mctrl() breakageRussell King
c538d20c7f (and maybe previous commits) broke set_mctrl() by making it only capable of setting bits in the MCR register. This prevents software controlled flow control and modem control line manipulation via TIOCMSET/TIOCMBIC from working correctly. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: no need to re-read EFRRussell King
There's no need to re-read EFR after we've recently written it; the register is a configuration register which doesn't change its value without us writing to it. The last value which was written to this register was up->efr. Removing this re-reading avoids the possibility that we end up with up->efr having unintended bits set, which should only be temporarily set when accessing the enhanced features. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: remove setting of EFR SCD bitRussell King
The SCD (special character detect) bit enables comparisons with XOFF2, which we do not program. As the XOFF2 character remains unprogrammed, there's little point enabling this feature along with its associated interrupt. Remove this, and ensure that the SCD bit is cleared. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: allow hardware assisted IXANY mode to be disabledRussell King
Nothing was clearing the UART_MCR_XONANY bit, so once the ixany mode gets set, there's no possibility to disable it. Clear this bit when IXANY mode is cleared. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: omap: allow hardware assisted rts/cts modes to be disabledRussell King
There is nothing which clears the auto RTS/CTS bits, so once hardware flow control gets enabled, there's no possibility to disable it. So, clear these bits when CRTSCTS is cleared. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: core: add throttle/unthrottle callbacks for hardware assisted flow ↵Russell King
control Add two callbacks for hardware assisted flow control; we need to know when the tty layers want us to stop and restart due to their buffer levels. Call a driver specific throttle/unthrottle function if and only if the driver indicates that it is using an enabled hardware assisted flow control method, otherwise fall back to the non-hardware assisted methods. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: core: add hardware assisted h/w flow control supportRussell King
Ports which are handling h/w flow control in hardware must not have their RTS state altered depending on the tty's hardware-stopped state. Avoid this additional logic when setting the termios state. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: core: add hardware assisted s/w flow control supportRussell King
Ports which are capable of handling s/w flow control in hardware to know when the s/w flow control termios settings are changed. Add a flag to allow the low level serial drivers to indicate that they support this, and these changes should be propagated to them. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2012-11-04SERIAL: core: use local variable uport in uart_set_termios()Russell King
This is to make the following change more clear. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>