From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 2 Jan 2013 20:58:20 -0600 Subject: [U-Boot] [PATCH 1/1] serial/ns16550: check UART mode for TEMT value In-Reply-To: (from martinez.javier@gmail.com on Sun Dec 23 17:17:25 2012) Message-ID: <1357181900.14228.19@snotra> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/23/2012 05:17:25 PM, Javier Martinez Canillas wrote: > On Sat, Dec 22, 2012 at 4:40 AM, Javier Martinez Canillas > 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