[U-Boot] [PATCH] Serial port related patches

Patch 1: drivers: serial: Fix serial_getc returns immediately when RX buffer enabled
The command prompt calls serial_getc directly, without checking for data availability using serial_tstc. Therefore, it need to be checked in serial_getc too.
Patch 2: drivers: serial: ns16550: Fix for CONFIG_DEBUG_UART_SKIP_INIT
This driver did not check for CONFIG_DEBUG_UART_SKIP_INIT.
Patch 3: drivers: serial: ns16550: Support for UART interface on JZ4740
The UART interface on the JZ4740 SoC is not strictly compatible with the 16550 implementation. The baud rate formula on the programming manual was wrong. Presumably on older versions of kernel and u-boot the calculation does not round up, so it was working properly.
The baud rate should be:
baud = fEXT / (16 * (Divisor + 1))
(Tested on actual device)
Regards, Norman Zhi
participants (1)
-
Yubo Zhi