serial/ns16550: add an option to avoid hanging on broken platforms
PATCH 1/2 serial/ns16550: add an option to avoid hanging on broken platforms
Some platforms (e.g. IGEPv2 board) has a broken ns16550 UART that does not set the TEMT bit when the transmitter is empty in SPL. This makes U-Boot to hang while waiting for TEMT to be set.
Add a new option to avoid this:
CONFIG_SYS_NS16550_BROKEN_TEMT
16550 UART set the Transmitter Empty (TEMT) Bit when all output has finished and the transmitter is totally empty. U-Boot waits for this bit to be set to initialize the serial console. On some broken platforms this bit is not set in SPL making U-Boot to hang while waiting for TEMT. Define this option to avoid it.
--- README | 8 ++++++++ drivers/serial/ns16550.c | 2 ++ 2 files changed, 10 insertions(+), 0 deletions(-)
README +8 -0
@@ -616,6 +616,14 @@ The following options need to be configured: boot loader that has already initialized the UART. Define this variable to flush the UART at init time. + CONFIG_SYS_NS16550_BROKEN_TEMT + + 16550 UART set the Transmitter Empty (TEMT) Bit when all output + has finished and the transmitter is totally empty. U-Boot waits + for this bit to be set to initialize the serial console. On some + broken platforms this bit is not set in SPL making U-Boot to + hang while waiting for TEMT. Define this option to avoid it. + - Console Interface: Depending on board, define exactly one serial port
drivers/serial/ns16550.c +2 -0
@@ -36,8 +36,10 @@void NS16550_init (NS16550_t com_port,int baud_divisor) { +#if (!defined(CONFIG_SYS_NS16550_BROKEN_TEMT ))while (!(serial_in (&com_port->lsr) &UART_LSR_TEMT )) ; +#endif serial_out (CONFIG_SYS_NS16550_IER , &com_port->ier); #if (defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)) || \
Signature · 1 line
1.7.7.6
PATCH 2/2 OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT
IGEP board PC16550D (ns16550) UART doesn't set the Transmitter Empty (TEMT) Bit in SPL. This makes U-Boot to hang while waiting for TEMT. Add the CONFIG_SYS_NS16550_BROKEN_TEMT config option to avoid this issue.
--- include/configs/igep00x0.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
include/configs/igep00x0.h +3 -0
@@ -67,6 +67,9 @@#define CONFIG_SYS_NS16550_REG_SIZE (-4)#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK +/* define to avoid U-Boot to hang while waiting for TEMT */ +#define CONFIG_SYS_NS16550_BROKEN_TEMT +/* select serial console configuration */ #define CONFIG_CONS_INDEX 3#define CONFIG_SYS_NS16550_COM3 OMAP34XX_UART3
Signature · 1 line
1.7.7.6
PATCH 2/2 OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT
Quoted 7 lines · Javier Martinez Canillas
IGEP board PC16550D (ns16550) UART doesn't set the Transmitter Empty (TEMT) Bit in SPL. This makes U-Boot to hang while waiting for TEMT. Add the
CONFIG_SYS_NS16550_BROKEN_TEMTconfig option to avoid this issue.Signed-off-by Javier Martinez Canillas <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130111/22e25bb2/attachment.pgp>
PATCH 1/2 serial/ns16550: add an option to avoid hanging on broken platforms
In reply to Javier Martinez CanillasQuoted 8 lines · Javier Martinez Canillas
Some platforms (e.g. IGEPv2 board) has a broken ns16550 UART that does not set the TEMT bit when the transmitter is empty in SPL. This makes U-Boot to hang while waiting for TEMT to be set.
Add a new option to avoid this:
CONFIG_SYS_NS16550_BROKEN_TEMT
Quoted 7 lines
16550 UART set the Transmitter Empty (TEMT) Bit when all output has finished and the transmitter is totally empty. U-Boot waits for this bit to be set to initialize the serial console. On some broken platforms this bit is not set in SPL making U-Boot to hang while waiting for TEMT. Define this option to avoid it.
Signed-off-by Javier Martinez Canillas <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130111/f2973476/attachment.pgp>