* [U-Boot] [PATCH 1/2] serial/ns16550: add an option to avoid hanging on broken platforms
@ 2013-01-07 11:35 Javier Martinez Canillas
2013-01-07 11:35 ` [U-Boot] [PATCH 2/2] OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT Javier Martinez Canillas
2013-01-11 14:42 ` [U-Boot] [U-Boot, 1/2] serial/ns16550: add an option to avoid hanging on broken platforms Tom Rini
0 siblings, 2 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2013-01-07 11:35 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
README | 8 ++++++++
drivers/serial/ns16550.c | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/README b/README
index 78f40df..a89861e 100644
--- a/README
+++ b/README
@@ -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
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index bbd91ca..87a0917 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -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)) || \
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/2] OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT
2013-01-07 11:35 [U-Boot] [PATCH 1/2] serial/ns16550: add an option to avoid hanging on broken platforms Javier Martinez Canillas
@ 2013-01-07 11:35 ` Javier Martinez Canillas
2013-01-11 14:42 ` [U-Boot] [U-Boot, " Tom Rini
2013-01-11 14:42 ` [U-Boot] [U-Boot, 1/2] serial/ns16550: add an option to avoid hanging on broken platforms Tom Rini
1 sibling, 1 reply; 4+ messages in thread
From: Javier Martinez Canillas @ 2013-01-07 11:35 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
include/configs/igep00x0.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h
index 2110e64..a5912f0 100644
--- a/include/configs/igep00x0.h
+++ b/include/configs/igep00x0.h
@@ -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
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [U-Boot, 1/2] serial/ns16550: add an option to avoid hanging on broken platforms
2013-01-07 11:35 [U-Boot] [PATCH 1/2] serial/ns16550: add an option to avoid hanging on broken platforms Javier Martinez Canillas
2013-01-07 11:35 ` [U-Boot] [PATCH 2/2] OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT Javier Martinez Canillas
@ 2013-01-11 14:42 ` Tom Rini
1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2013-01-11 14:42 UTC (permalink / raw)
To: u-boot
On Mon, Jan 07, 2013 at 01:35:20AM -0000, Javier Martinez Canillas wrote:
> 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.
>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Applied to u-boot-ti/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [U-Boot, 2/2] OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT
2013-01-07 11:35 ` [U-Boot] [PATCH 2/2] OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT Javier Martinez Canillas
@ 2013-01-11 14:42 ` Tom Rini
0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2013-01-11 14:42 UTC (permalink / raw)
To: u-boot
On Mon, Jan 07, 2013 at 01:35:21AM -0000, Javier Martinez Canillas wrote:
> 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.
>
> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Applied to u-boot-ti/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-11 14:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 11:35 [U-Boot] [PATCH 1/2] serial/ns16550: add an option to avoid hanging on broken platforms Javier Martinez Canillas
2013-01-07 11:35 ` [U-Boot] [PATCH 2/2] OMAP3: igep00x0: add CONFIG_SYS_NS16550_BROKEN_TEMT Javier Martinez Canillas
2013-01-11 14:42 ` [U-Boot] [U-Boot, " Tom Rini
2013-01-11 14:42 ` [U-Boot] [U-Boot, 1/2] serial/ns16550: add an option to avoid hanging on broken platforms Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox