diff options
author | Marcus Folkesson <marcus.folkesson@gmail.com> | 2011-08-30 07:53:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-22 18:47:53 -0400 |
commit | e44aabd649c80e8be16ede3ed3cbff6fb2561ca9 (patch) | |
tree | dbb84aa155527ad4cb08505c8706301e6fe59e22 /drivers/tty/serial/pxa.c | |
parent | 7d4008ebb1c971ce4baf57e45993690b0fa6d9f9 (diff) |
serial: pxa: work around for errata #20
Errata E20: UART: Character Timeout interrupt remains set under certain
software conditions.
Implication: The software servicing the UART can be trapped in an infinite loop.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial/pxa.c')
-rw-r--r-- | drivers/tty/serial/pxa.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c index 531931c1b250..5c8e3bba6c84 100644 --- a/drivers/tty/serial/pxa.c +++ b/drivers/tty/serial/pxa.c | |||
@@ -100,6 +100,16 @@ static inline void receive_chars(struct uart_pxa_port *up, int *status) | |||
100 | int max_count = 256; | 100 | int max_count = 256; |
101 | 101 | ||
102 | do { | 102 | do { |
103 | /* work around Errata #20 according to | ||
104 | * Intel(R) PXA27x Processor Family | ||
105 | * Specification Update (May 2005) | ||
106 | * | ||
107 | * Step 2 | ||
108 | * Disable the Reciever Time Out Interrupt via IER[RTOEI] | ||
109 | */ | ||
110 | up->ier &= ~UART_IER_RTOIE; | ||
111 | serial_out(up, UART_IER, up->ier); | ||
112 | |||
103 | ch = serial_in(up, UART_RX); | 113 | ch = serial_in(up, UART_RX); |
104 | flag = TTY_NORMAL; | 114 | flag = TTY_NORMAL; |
105 | up->port.icount.rx++; | 115 | up->port.icount.rx++; |
@@ -156,6 +166,16 @@ static inline void receive_chars(struct uart_pxa_port *up, int *status) | |||
156 | *status = serial_in(up, UART_LSR); | 166 | *status = serial_in(up, UART_LSR); |
157 | } while ((*status & UART_LSR_DR) && (max_count-- > 0)); | 167 | } while ((*status & UART_LSR_DR) && (max_count-- > 0)); |
158 | tty_flip_buffer_push(tty); | 168 | tty_flip_buffer_push(tty); |
169 | |||
170 | /* work around Errata #20 according to | ||
171 | * Intel(R) PXA27x Processor Family | ||
172 | * Specification Update (May 2005) | ||
173 | * | ||
174 | * Step 6: | ||
175 | * No more data in FIFO: Re-enable RTO interrupt via IER[RTOIE] | ||
176 | */ | ||
177 | up->ier |= UART_IER_RTOIE; | ||
178 | serial_out(up, UART_IER, up->ier); | ||
159 | } | 179 | } |
160 | 180 | ||
161 | static void transmit_chars(struct uart_pxa_port *up) | 181 | static void transmit_chars(struct uart_pxa_port *up) |