aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2016-01-04 15:37:41 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-06 21:02:45 -0800
commitcdf091ca2c3d6875e5f0fca28de4a6ca2f5273e6 (patch)
tree4d7783757d062607d747ecf4305a0fd675285d9c /drivers/tty
parentMerge 4.4-rc6 into tty-next (diff)
downloadlinux-dev-cdf091ca2c3d6875e5f0fca28de4a6ca2f5273e6.tar.xz
linux-dev-cdf091ca2c3d6875e5f0fca28de4a6ca2f5273e6.zip
tty: amba-pl011: fix earlycon register offsets
The REG_x macros are indices into a table, not register offsets. Since earlycon does not have access to the vendor data, we can currently only support standard ARM PL011 devices. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Huang Shijie <shijie.huang@arm.com> Signed-off-by: Timur Tabi <timur@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/amba-pl011.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 3b24aea343de..a7d7ab05dc64 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2301,10 +2301,10 @@ static struct console amba_console = {
static void pl011_putc(struct uart_port *port, int c)
{
- while (readl(port->membase + REG_FR) & UART01x_FR_TXFF)
+ while (readl(port->membase + UART01x_FR) & UART01x_FR_TXFF)
;
- writeb(c, port->membase + REG_DR);
- while (readl(port->membase + REG_FR) & UART01x_FR_BUSY)
+ writeb(c, port->membase + UART01x_DR);
+ while (readl(port->membase + UART01x_FR) & UART01x_FR_BUSY)
;
}