From 529b541e8b81f68bb6ee3c6ecdb43b5cbe0a9d70 Mon Sep 17 00:00:00 2001 From: Benjamin Fair Date: Fri, 14 Oct 2016 01:13:33 +0000 Subject: drivers: ti: uart: Add TI specific 16550 initialization On TI platforms the UART is disabled by default and must be explicitly enabled using the MDR1 register. NOTE: The original definition of http://www.ti.com/lit/ds/symlink/pc16550d.pdf has no MDR register, but many TI SoCs implementing 16550 do have a quirky MDR register implemented. So, this should be enabled with TI_16550_MDR_QUIRK NOTE: In such implementation, the CSR register does not exist. Signed-off-by: Benjamin Fair Signed-off-by: Nishanth Menon Signed-off-by: Andrew F. Davis --- drivers/ti/uart/aarch64/16550_console.S | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/ti/uart/aarch64/16550_console.S b/drivers/ti/uart/aarch64/16550_console.S index 56e7e5c11..d46fa6119 100644 --- a/drivers/ti/uart/aarch64/16550_console.S +++ b/drivers/ti/uart/aarch64/16550_console.S @@ -66,6 +66,10 @@ func console_16550_core_init /* no interrupt */ mov w3, #0 str w3, [x0, #UARTIER] +#ifdef TI_16550_MDR_QUIRK + /* UART must be enabled on some platforms via the MDR register */ + str w3, [x0, #UARTMDR1] +#endif /* TI_16550_MDR_QUIRK */ /* enable fifo, DMA */ mov w3, #(UARTFCR_FIFOEN | UARTFCR_DMAEN) str w3, [x0, #UARTFCR] -- cgit v1.2.3