diff options
author | Lukas Wunner <lukas@wunner.de> | 2017-10-25 11:06:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-04 14:08:54 +0300 |
commit | 2a76fa2830981e15bfa33c2b0e5f2dfd35b0455c (patch) | |
tree | c96ff0a29bd513217f2fcfcffee52c7f8591b0e2 /drivers/tty/serial/amba-pl011.c | |
parent | 3236a965486ba0c6043cf2c7b51943d8b382ae29 (diff) | |
download | linux-2a76fa2830981e15bfa33c2b0e5f2dfd35b0455c.tar.xz |
serial: pl011: Adopt generic flag to store auto RTS status
Back in 2010, commit 3b43816f685f ("ARM: 5933/1: amba-pl011: support
hardware flow control") added an autorts flag to this driver to store
whether automatic hardware flow control is requested.
In 2015, commit 391f93f2ec9f ("serial: core: Rework hw-assisted flow
control support") added a flag with identical functionality to generic
code.
Switch over to that flag and drop the driver-specific one.
Cc: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/amba-pl011.c')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index dab36369f71e..04f353452a7a 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -281,7 +281,6 @@ struct uart_amba_port { unsigned int old_status; unsigned int fifosize; /* vendor-specific */ unsigned int old_cr; /* state during shutdown */ - bool autorts; unsigned int fixed_baud; /* vendor-set fixed baud rate */ char type[12]; #ifdef CONFIG_DMA_ENGINE @@ -1586,7 +1585,7 @@ static void pl011_set_mctrl(struct uart_port *port, unsigned int mctrl) TIOCMBIT(TIOCM_OUT2, UART011_CR_OUT2); TIOCMBIT(TIOCM_LOOP, UART011_CR_LBE); - if (uap->autorts) { + if (port->status & UPSTAT_AUTORTS) { /* We need to disable auto-RTS if we want to turn RTS off */ TIOCMBIT(TIOCM_RTS, UART011_CR_RTSEN); } @@ -1840,7 +1839,7 @@ static void pl011_disable_uart(struct uart_amba_port *uap) { unsigned int cr; - uap->autorts = false; + uap->port.status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS); spin_lock_irq(&uap->port.lock); cr = pl011_read(uap, REG_CR); uap->old_cr = cr; @@ -2026,10 +2025,10 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios, old_cr |= UART011_CR_RTSEN; old_cr |= UART011_CR_CTSEN; - uap->autorts = true; + port->status |= UPSTAT_AUTOCTS | UPSTAT_AUTORTS; } else { old_cr &= ~(UART011_CR_CTSEN | UART011_CR_RTSEN); - uap->autorts = false; + port->status &= ~(UPSTAT_AUTOCTS | UPSTAT_AUTORTS); } if (uap->vendor->oversampling) { |