From: Jonathan McDowell Date: Tue, 15 Aug 2006 06:05:32 +0000 (-0700) Subject: [SERIAL] OMAP1510 serial fix for 115200 baud X-Git-Tag: v2.6.19-rc1~215^2~7 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=255341c6fded73204b1ee6feb5fe16e125b27f62;p=linux-2.6-omap-h63xx.git [SERIAL] OMAP1510 serial fix for 115200 baud The patch below is necessary for 115200 baud on an OMAP1510 internal UART. It's been in the linux-omap tree for some time and with it applied to a vanilla Linus git tree the serial console on the Amstrad Delta (which is OMAP1510 based and whose initial bootloader runs at 115200) works fine (it doesn't without it). Signed-off-by: Jonathan McDowell Signed-off-by: Andrew Morton Signed-off-by: Russell King --- diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index cef03e68771..a07442ffefb 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -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);