Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338358
b: refs/heads/master
c: 54ec52b
h: refs/heads/master
v: v3
  • Loading branch information
Tony Lindgren authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent e15f440 commit b3d0485
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b15d5380e471f9ce27180b14d5080abc2e2f30ec
refs/heads/master: 54ec52b6dd3b0ba4bc4eb97e7e1b2534705b326c
9 changes: 0 additions & 9 deletions trunk/arch/arm/plat-omap/include/plat/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,6 @@
#define OMAP5UART4 OMAP4UART4
#define ZOOM_UART 95 /* Only on zoom2/3 */

/* This is only used by 8250.c for omap1510 */
#define is_omap_port(pt) ({int __ret = 0; \
if ((pt)->port.mapbase == OMAP1_UART1_BASE || \
(pt)->port.mapbase == OMAP1_UART2_BASE || \
(pt)->port.mapbase == OMAP1_UART3_BASE) \
__ret = 1; \
__ret; \
})

#ifndef __ASSEMBLER__

struct omap_board_data;
Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/tty/serial/8250/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}

Expand Down
36 changes: 36 additions & 0 deletions trunk/drivers/tty/serial/8250/8250.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b3d0485

Please sign in to comment.