tty: amba-pl011: fix earlycon register offsets
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 4 Jan 2016 21:37:41 +0000 (15:37 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jan 2016 05:02:45 +0000 (21:02 -0800)
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>
drivers/tty/serial/amba-pl011.c

index 3b24aea343de1440057c1392490e08e7395d92fc..a7d7ab05dc649e67315de9e4c47797641049e45e 100644 (file)
@@ -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)
                ;
 }
 
This page took 0.02762 seconds and 5 git commands to generate.