diff options
| -rw-r--r-- | drivers/serial/bfin_5xx.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 3f39e1814693..6f475b609864 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
| @@ -231,12 +231,10 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart) | |||
| 231 | { | 231 | { |
| 232 | struct tty_struct *tty = uart->port.info->tty; | 232 | struct tty_struct *tty = uart->port.info->tty; |
| 233 | unsigned int status, ch, flg; | 233 | unsigned int status, ch, flg; |
| 234 | static int in_break = 0; | ||
| 234 | #ifdef CONFIG_KGDB_UART | 235 | #ifdef CONFIG_KGDB_UART |
| 235 | struct pt_regs *regs = get_irq_regs(); | 236 | struct pt_regs *regs = get_irq_regs(); |
| 236 | #endif | 237 | #endif |
| 237 | #ifdef BF533_FAMILY | ||
| 238 | static int in_break = 0; | ||
| 239 | #endif | ||
| 240 | 238 | ||
| 241 | status = UART_GET_LSR(uart); | 239 | status = UART_GET_LSR(uart); |
| 242 | ch = UART_GET_CHAR(uart); | 240 | ch = UART_GET_CHAR(uart); |
| @@ -262,29 +260,30 @@ static void bfin_serial_rx_chars(struct bfin_serial_port *uart) | |||
| 262 | } | 260 | } |
| 263 | } | 261 | } |
| 264 | #endif | 262 | #endif |
| 265 | 263 | ||
| 266 | #ifdef BF533_FAMILY | 264 | if (ANOMALY_05000230) { |
| 267 | /* The BF533 family of processors have a nice misbehavior where | 265 | /* The BF533 family of processors have a nice misbehavior where |
| 268 | * they continuously generate characters for a "single" break. | 266 | * they continuously generate characters for a "single" break. |
| 269 | * We have to basically ignore this flood until the "next" valid | 267 | * We have to basically ignore this flood until the "next" valid |
| 270 | * character comes across. All other Blackfin families operate | 268 | * character comes across. All other Blackfin families operate |
| 271 | * properly though. | 269 | * properly though. |
| 272 | */ | 270 | * Note: While Anomaly 05000230 does not directly address this, |
| 273 | if (in_break) { | 271 | * the changes that went in for it also fixed this issue. |
| 274 | if (ch != 0) { | 272 | */ |
| 275 | in_break = 0; | 273 | if (in_break) { |
| 276 | ch = UART_GET_CHAR(uart); | 274 | if (ch != 0) { |
| 277 | if (bfin_revid() < 5) | 275 | in_break = 0; |
| 276 | ch = UART_GET_CHAR(uart); | ||
| 277 | if (bfin_revid() < 5) | ||
| 278 | return; | ||
| 279 | } else | ||
| 278 | return; | 280 | return; |
| 279 | } else | 281 | } |
| 280 | return; | ||
| 281 | } | 282 | } |
| 282 | #endif | ||
| 283 | 283 | ||
| 284 | if (status & BI) { | 284 | if (status & BI) { |
| 285 | #ifdef BF533_FAMILY | 285 | if (ANOMALY_05000230) |
| 286 | in_break = 1; | 286 | in_break = 1; |
| 287 | #endif | ||
| 288 | uart->port.icount.brk++; | 287 | uart->port.icount.brk++; |
| 289 | if (uart_handle_break(&uart->port)) | 288 | if (uart_handle_break(&uart->port)) |
| 290 | goto ignore_char; | 289 | goto ignore_char; |
