From 8e50254a6ab2abb6ae08699adffe3d89e4c75912 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 4 Sep 2015 09:12:03 -0700 Subject: Revert "uart: pl011: Improve LCRH register access decision" This reverts commit 09dcc7dfc05b31bf0bbcd1511cd1a2644908d5c8 as with this patch the serial console is broken on lots of platforms. Reported-by: Marc Zyngier Cc: Jun Nie Acked-by: Will Deacon Tested-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/amba-pl011.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'drivers/tty') diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 017443d092c1..e1f3bd5afad6 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -249,11 +249,6 @@ struct uart_amba_port { #endif }; -static bool is_implemented(struct uart_amba_port *uap, unsigned int reg) -{ - return uap->reg_lut[reg] != (u16)~0; -} - static unsigned int pl011_readw(struct uart_amba_port *uap, int index) { WARN_ON(index > REG_NR); @@ -1654,7 +1649,7 @@ static int pl011_hwinit(struct uart_port *port) static void pl011_write_lcr_h(struct uart_amba_port *uap, unsigned int lcr_h) { pl011_writew(uap, lcr_h, uap->lcrh_rx); - if (is_implemented(uap, REG_ST_LCRH_RX)) { + if (uap->lcrh_rx != uap->lcrh_tx) { int i; /* * Wait 10 PCLKs before writing LCRH_TX register, @@ -1789,7 +1784,7 @@ static void pl011_disable_uart(struct uart_amba_port *uap) * disable break condition and fifos */ pl011_shutdown_channel(uap, uap->lcrh_rx); - if (is_implemented(uap, REG_ST_LCRH_RX)) + if (uap->lcrh_rx != uap->lcrh_tx) pl011_shutdown_channel(uap, uap->lcrh_tx); } -- cgit v1.2.3