diff options
author | Tony Lindgren <tony@atomide.com> | 2012-10-03 15:31:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-24 11:30:57 -0700 |
commit | 54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c (patch) | |
tree | d0e9a949ddad24d90994236ddbc0668911157992 /drivers/tty/serial/8250/8250.h | |
parent | b15d5380e471f9ce27180b14d5080abc2e2f30ec (diff) | |
download | op-kernel-dev-54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c.zip op-kernel-dev-54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c.tar.gz |
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.h')
-rw-r--r-- | drivers/tty/serial/8250/8250.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h index 5a76f9c..3b4ea84 100644 --- a/drivers/tty/serial/8250/8250.h +++ b/drivers/tty/serial/8250/8250.h @@ -106,3 +106,39 @@ static inline int serial8250_pnp_init(void) { return 0; } static inline void serial8250_pnp_exit(void) { } #endif +#ifdef CONFIG_ARCH_OMAP1 +static inline int is_omap1_8250(struct uart_8250_port *pt) +{ + int res; + + switch (pt->port.mapbase) { + case OMAP1_UART1_BASE: + case OMAP1_UART2_BASE: + case OMAP1_UART3_BASE: + res = 1; + break; + default: + res = 0; + break; + } + + return res; +} + +static inline int is_omap1510_8250(struct uart_8250_port *pt) +{ + if (!cpu_is_omap1510()) + return 0; + + return is_omap1_8250(pt); +} +#else +static inline int is_omap1_8250(struct uart_8250_port *pt) +{ + return 0; +} +static inline int is_omap1510_8250(struct uart_8250_port *pt) +{ + return 0; +} +#endif |