[U-Boot] DaVinci serial bug with ns16550.c
Andrew Dyer
amdyer at gmail.com
Fri Jul 24 01:25:25 CEST 2009
We noticed in the TI distribution of u-boot (1.2.0) that if you point
the u-boot ns16550.c serial driver at a UART other than uart0, it
doesn't work. We believe the issue also exists in the current
version.
The root problem is that the MDR1 register in the UART defaults to
disabled. We believe the RBL (rom boot loader) in the part
initializes this register as part of it's startup for UART0, but
running on one of the other uarts, it doesn't get initialized. There
are #ifdefs to take care of this condition for OMAP, but not DaVinci.
See lines 20-22 and 33-39 below (taken from the gitweb view of the
u-boot tree).
In particular we are using DM6467, but I'm guessing this would be
applicable to others in the family. Sorry I don't have a patch for
git - we are only working with the TI version for now.
17 void NS16550_init (NS16550_t com_port, int baud_divisor)
18 {
19 com_port->ier = 0x00;
20 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
21 com_port->mdr1 = 0x7; /* mode select reset TL16C750*/
22 #endif
23 com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
24 com_port->dll = 0;
25 com_port->dlm = 0;
26 com_port->lcr = UART_LCRVAL;
27 com_port->mcr = UART_MCRVAL;
28 com_port->fcr = UART_FCRVAL;
29 com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
30 com_port->dll = baud_divisor & 0xff;
31 com_port->dlm = (baud_divisor >> 8) & 0xff;
32 com_port->lcr = UART_LCRVAL;
33 #if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
34 #if defined(CONFIG_APTIX)
35 com_port->mdr1 = 3; /* /13 mode so Aptix 6MHz can hit 115200 */
36 #else
37 com_port->mdr1 = 0; /* /16 is proper to hit 115200
with 48MHz */
38 #endif
39 #endif /* CONFIG_OMAP */
40 }
More information about the U-Boot
mailing list