提交 cdf091ca 编写于 作者: R Russell King 提交者: Greg Kroah-Hartman

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: NRussell King <rmk+kernel@arm.linux.org.uk>
Tested-by: NHuang Shijie <shijie.huang@arm.com>
Signed-off-by: NTimur Tabi <timur@codeaurora.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 462a1196
......@@ -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)
;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册