From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lubomir Rintel Date: Tue, 17 Nov 2020 22:00:03 +0100 Subject: [PATCH RFC 05/20] ns16550: Turn on the UME bit if on ARCH_JZ47XX In-Reply-To: <20201117210018.751469-1-lkundrak@v3.sk> References: <20201117210018.751469-1-lkundrak@v3.sk> Message-ID: <20201117210018.751469-6-lkundrak@v3.sk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The jz47xx serial port is essentially a ns16550 with an extra bit that needs to be turned on. The driver already takes care of it, but not in the early debug config path. Signed-off-by: Lubomir Rintel --- drivers/serial/ns16550.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index 702109b23b6..0cf667c2731 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -326,6 +326,7 @@ static inline void _debug_uart_init(void) { struct NS16550 *com_port = (struct NS16550 *)CONFIG_DEBUG_UART_BASE; int baud_divisor; + int fcr = UART_FCR_DEFVAL; /* * We copy the code from above because it is already horribly messy. @@ -335,9 +336,13 @@ static inline void _debug_uart_init(void) */ baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE); + + if (IS_ENABLED(CONFIG_ARCH_JZ47XX)) + fcr |= UART_FCR_UME; + serial_dout(&com_port->ier, CONFIG_SYS_NS16550_IER); serial_dout(&com_port->mcr, UART_MCRVAL); - serial_dout(&com_port->fcr, UART_FCR_DEFVAL); + serial_dout(&com_port->fcr, fcr); serial_dout(&com_port->lcr, UART_LCR_BKSE | UART_LCRVAL); serial_dout(&com_port->dll, baud_divisor & 0xff); -- 2.28.0