[U-Boot] [PATCH 1/1] serial/ns16550: check UART mode for TEMT value

Scott Wood scottwood at freescale.com
Thu Jan 3 03:58:20 CET 2013


On 12/23/2012 05:17:25 PM, Javier Martinez Canillas wrote:
> On Sat, Dec 22, 2012 at 4:40 AM, Javier Martinez Canillas
> <javier.martinez at collabora.co.uk> wrote:
> >
> > But if I'm the only one having this issue maybe is just my hardware  
> behaving
> > badly. I'll ask other OMAP3 users if they can boot with mainline  
> U-Boot to
> > confirm this.
> >
> 
> Hello,
> 
> I tested with an Beagleboard which is another OMAP3 board that has the
> same PC16550D UART than my OMAP3 IGEPv2 and the board does not hang
> while waiting for TEMT. I've also tested with an OMAP4 pandaboard and
> it boots correctly too.
> 
> But the hung issue seems to not be an issue with my IGEPv2 board but
> with any IGEPv2 board since another user reported that his board hangs
> with the latest U-Boot too. Reverting cb55b332 (serial/ns16550: wait
> for TEMT before initializing) solved the issue for him.
> 
> Will a patch like this be an acceptable solution?
> 
> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
> index bbd91ca..8106a9a 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 (CONFIG_MACH_TYPE != MACH_TYPE_IGEP0020)
>         while (!(serial_in(&com_port->lsr) & UART_LSR_TEMT))
>                 ;
> +#endif

Probably better to have your board config file define  
CONFIG_SYS_NS16550_BROKEN_TEMT or similar (and document the symbol in  
README).

-Scott


More information about the U-Boot mailing list