mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
drivers: ti: uart: remove UART_FCR writes
This patch removes the code that touched UART_FCR, from console_core_putc(). The check for whether transmit FIFO is full is sufficient before writing to UART TX FIFO. In fact setting UARTFCR_TXCLR immediately after a byte is written to FIFO might even result in loss of that byte, if UART hasn't sent that byte out yet. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
@@ -115,9 +115,6 @@ func console_core_putc
|
||||
b.ne 1b
|
||||
mov w2, #0xD /* '\r' */
|
||||
str w2, [x1, #UARTTX]
|
||||
ldr w2, [x1, #UARTFCR]
|
||||
orr w2, w2, #UARTFCR_TXCLR
|
||||
str w2, [x1, #UARTFCR]
|
||||
|
||||
/* Check if the transmit FIFO is full */
|
||||
2: ldr w2, [x1, #UARTLSR]
|
||||
@@ -125,9 +122,6 @@ func console_core_putc
|
||||
cmp w2, #(UARTLSR_TEMT | UARTLSR_THRE)
|
||||
b.ne 2b
|
||||
str w0, [x1, #UARTTX]
|
||||
ldr w2, [x1, #UARTFCR]
|
||||
orr w2, w2, #UARTFCR_TXCLR
|
||||
str w2, [x1, #UARTFCR]
|
||||
ret
|
||||
putc_error:
|
||||
mov w0, #-1
|
||||
|
||||
Reference in New Issue
Block a user