diff options
| -rw-r--r-- | arch/arm/mach-omap2/serial.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 19805a7de06c..8c964bec8159 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
| @@ -125,6 +125,13 @@ static struct plat_serial8250_port serial_platform_data3[] = { | |||
| 125 | } | 125 | } |
| 126 | }; | 126 | }; |
| 127 | #endif | 127 | #endif |
| 128 | static inline unsigned int __serial_read_reg(struct uart_port *up, | ||
| 129 | int offset) | ||
| 130 | { | ||
| 131 | offset <<= up->regshift; | ||
| 132 | return (unsigned int)__raw_readb(up->membase + offset); | ||
| 133 | } | ||
| 134 | |||
| 128 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, | 135 | static inline unsigned int serial_read_reg(struct plat_serial8250_port *up, |
| 129 | int offset) | 136 | int offset) |
| 130 | { | 137 | { |
| @@ -583,11 +590,12 @@ static unsigned int serial_in_override(struct uart_port *up, int offset) | |||
| 583 | { | 590 | { |
| 584 | if (UART_RX == offset) { | 591 | if (UART_RX == offset) { |
| 585 | unsigned int lsr; | 592 | unsigned int lsr; |
| 586 | lsr = serial_read_reg(omap_uart[up->line].p, UART_LSR); | 593 | lsr = __serial_read_reg(up, UART_LSR); |
| 587 | if (!(lsr & UART_LSR_DR)) | 594 | if (!(lsr & UART_LSR_DR)) |
| 588 | return -EPERM; | 595 | return -EPERM; |
| 589 | } | 596 | } |
| 590 | return serial_read_reg(omap_uart[up->line].p, offset); | 597 | |
| 598 | return __serial_read_reg(up, offset); | ||
| 591 | } | 599 | } |
| 592 | 600 | ||
| 593 | void __init omap_serial_early_init(void) | 601 | void __init omap_serial_early_init(void) |
