summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ns16550.c5
-rw-r--r--drivers/serial.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ns16550.c b/drivers/ns16550.c
index b20ae4b..a7aa40f 100644
--- a/drivers/ns16550.c
+++ b/drivers/ns16550.c
@@ -26,10 +26,9 @@ void NS16550_init (NS16550_t com_port, int baud_divisor)
com_port->lcr = LCRVAL;
com_port->mcr = MCRVAL;
com_port->fcr = FCRVAL;
-#ifdef CONFIG_OMAP1510
- com_port->mdr1 = 0; /* select uart mode */
+#if defined(CONFIG_OMAP1510) || defined(CONFIG_OMAP1610)
+ com_port->mdr1 = 0; /* select uart mode */
#endif
-
}
void NS16550_reinit (NS16550_t com_port, int baud_divisor)
diff --git a/drivers/serial.c b/drivers/serial.c
index 44875e5..f5b51d6 100644
--- a/drivers/serial.c
+++ b/drivers/serial.c
@@ -53,6 +53,12 @@ static int calc_divisor (void)
}
console->osc_12m_sel = 0; /* clear if previsouly set */
#endif
+#ifdef CONFIG_OMAP1610
+ /* If can't cleanly clock 115200 set div to 1 */
+ if ((CFG_NS16550_CLK == 48000000) && (gd->baudrate == 115200)) {
+ return (26); /* return 26 for base divisor */
+ }
+#endif
return (CFG_NS16550_CLK / 16 / gd->baudrate);
}