summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/8250/8250.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2012-10-03 22:31:58 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-24 18:30:57 (GMT)
commit54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c (patch)
treed0e9a949ddad24d90994236ddbc0668911157992 /drivers/tty/serial/8250/8250.c
parentb15d5380e471f9ce27180b14d5080abc2e2f30ec (diff)
downloadlinux-54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c.tar.xz
tty/serial/8250: Make omap hardware workarounds local to 8250.h
This allows us to get rid of the ifdefs in 8250.c. Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250.c')
-rw-r--r--drivers/tty/serial/8250/8250.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/tty/serial/8250/8250.c b/drivers/tty/serial/8250/8250.c
index 3ba4234..5ccbd90 100644
--- a/drivers/tty/serial/8250/8250.c
+++ b/drivers/tty/serial/8250/8250.c
@@ -2349,16 +2349,14 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
serial_port_out(port, UART_EFR, efr);
}
-#ifdef CONFIG_ARCH_OMAP1
/* Workaround to enable 115200 baud on OMAP1510 internal ports */
- if (cpu_is_omap1510() && is_omap_port(up)) {
+ if (is_omap1510_8250(up)) {
if (baud == 115200) {
quot = 1;
serial_port_out(port, UART_OMAP_OSC_12M_SEL, 1);
} else
serial_port_out(port, UART_OMAP_OSC_12M_SEL, 0);
}
-#endif
/*
* For NatSemi, switch to bank 2 not bank 1, to avoid resetting EXCR2,
@@ -2439,10 +2437,9 @@ static unsigned int serial8250_port_size(struct uart_8250_port *pt)
{
if (pt->port.iotype == UPIO_AU)
return 0x1000;
-#ifdef CONFIG_ARCH_OMAP1
- if (is_omap_port(pt))
+ if (is_omap1_8250(pt))
return 0x16 << pt->port.regshift;
-#endif
+
return 8 << pt->port.regshift;
}