Browse Source

Merge pull request #1402 from glneo/for-upstream-uart

drivers: ti: uart: Add TI specific 16550 initialization
pull/1417/head
Dimitris Papastamos 6 years ago
committed by GitHub
parent
commit
ed4cf49020
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      drivers/ti/uart/aarch64/16550_console.S
  2. 2
      include/drivers/ti/uart/uart_16550.h

4
drivers/ti/uart/aarch64/16550_console.S

@ -66,6 +66,10 @@ func console_16550_core_init
/* no interrupt */ /* no interrupt */
mov w3, #0 mov w3, #0
str w3, [x0, #UARTIER] 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 */ /* enable fifo, DMA */
mov w3, #(UARTFCR_FIFOEN | UARTFCR_DMAEN) mov w3, #(UARTFCR_FIFOEN | UARTFCR_DMAEN)
str w3, [x0, #UARTFCR] str w3, [x0, #UARTFCR]

2
include/drivers/ti/uart/uart_16550.h

@ -23,6 +23,8 @@
#define UARTMSR 0x18 #define UARTMSR 0x18
#define UARTSPR 0x1c #define UARTSPR 0x1c
#define UARTCSR 0x20 #define UARTCSR 0x20
/* Some instances have MDR1 defined as well */
#define UARTMDR1 0x20
#define UARTRXFIFOCFG 0x24 #define UARTRXFIFOCFG 0x24
#define UARTMIE 0x28 #define UARTMIE 0x28
#define UARTVNDR 0x2c #define UARTVNDR 0x2c

Loading…
Cancel
Save