]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/8250.c
[SERIAL] OMAP1510 serial fix for 115200 baud
[linux-2.6-omap-h63xx.git] / drivers / serial / 8250.c
index cef03e68771b99c2763784f6e394e57535e89b54..a07442ffefbdff05080fbec613069bffcf4f5e49 100644 (file)
@@ -1896,6 +1896,17 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios,
                serial_outp(up, UART_EFR, efr);
        }
 
+#ifdef CONFIG_ARCH_OMAP15XX
+       /* Workaround to enable 115200 baud on OMAP1510 internal ports */
+       if (cpu_is_omap1510() && is_omap_port((unsigned int)up->port.membase)) {
+               if (baud == 115200) {
+                       quot = 1;
+                       serial_out(up, UART_OMAP_OSC_12M_SEL, 1);
+               } else
+                       serial_out(up, UART_OMAP_OSC_12M_SEL, 0);
+       }
+#endif
+
        if (up->capabilities & UART_NATSEMI) {
                /* Switch to bank 2 not bank 1, to avoid resetting EXCR2 */
                serial_outp(up, UART_LCR, 0xe0);