diff options
-rw-r--r-- | drivers/ti/uart/aarch64/16550_console.S | 2 | ||||
-rw-r--r-- | include/drivers/ti/uart/uart_16550.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ti/uart/aarch64/16550_console.S b/drivers/ti/uart/aarch64/16550_console.S index 05353814..84664829 100644 --- a/drivers/ti/uart/aarch64/16550_console.S +++ b/drivers/ti/uart/aarch64/16550_console.S @@ -146,7 +146,7 @@ endfunc console_core_putc func console_core_getc /* Check if the receive FIFO is empty */ 1: ldr w1, [x0, #UARTLSR] - tbz w1, #UARTLSR_RDR, 1b + tbz w1, #UARTLSR_RDR_BIT, 1b ldr w0, [x0, #UARTRX] ret getc_error: diff --git a/include/drivers/ti/uart/uart_16550.h b/include/drivers/ti/uart/uart_16550.h index 2c814ef2..773e2f16 100644 --- a/include/drivers/ti/uart/uart_16550.h +++ b/include/drivers/ti/uart/uart_16550.h @@ -88,6 +88,7 @@ #define UARTLSR_FERR (1 << 3) /* Framing Error */ #define UARTLSR_PERR (1 << 3) /* Parity Error */ #define UARTLSR_OVRF (1 << 2) /* Rx Overrun Error */ -#define UARTLSR_RDR (1 << 2) /* Rx Data Ready */ +#define UARTLSR_RDR_BIT (0) /* Rx Data Ready Bit */ +#define UARTLSR_RDR (1 << UARTLSR_RDR_BIT) /* Rx Data Ready */ #endif /* __UART_16550_H__ */ |