diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-01-04 21:37:41 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-07 05:02:45 (GMT) |
commit | cdf091ca2c3d6875e5f0fca28de4a6ca2f5273e6 (patch) | |
tree | 4d7783757d062607d747ecf4305a0fd675285d9c /drivers/tty/serial/amba-pl011.c | |
parent | 462a1196a578fc6f52c26427070a75e044bbf9b1 (diff) | |
download | linux-cdf091ca2c3d6875e5f0fca28de4a6ca2f5273e6.tar.xz |
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/serial/amba-pl011.c')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 3b24aea..a7d7ab0 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) ; } |