From: Russell King Date: Mon, 4 Jan 2016 21:37:41 +0000 (-0600) Subject: tty: amba-pl011: fix earlycon register offsets X-Git-Tag: v4.14-rc1~4042^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cdf091ca2c3d6875e5f0fca28de4a6ca2f5273e6;p=platform%2Fkernel%2Flinux-rpi.git 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 Tested-by: Huang Shijie Signed-off-by: Timur Tabi Signed-off-by: Greg Kroah-Hartman --- 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) ; }