Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdf091ca authored by Russell King's avatar Russell King Committed by Greg Kroah-Hartman
Browse files

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Tested-by: default avatarHuang Shijie <shijie.huang@arm.com>
Signed-off-by: default avatarTimur Tabi <timur@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 462a1196
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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)
		;
}