diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/pxa.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index b8629d74f6a2..4a821046baae 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -438,6 +438,7 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios, | |||
438 | unsigned char cval, fcr = 0; | 438 | unsigned char cval, fcr = 0; |
439 | unsigned long flags; | 439 | unsigned long flags; |
440 | unsigned int baud, quot; | 440 | unsigned int baud, quot; |
441 | unsigned int dll; | ||
441 | 442 | ||
442 | switch (termios->c_cflag & CSIZE) { | 443 | switch (termios->c_cflag & CSIZE) { |
443 | case CS5: | 444 | case CS5: |
@@ -534,10 +535,18 @@ serial_pxa_set_termios(struct uart_port *port, struct ktermios *termios, | |||
534 | else | 535 | else |
535 | up->mcr &= ~UART_MCR_AFE; | 536 | up->mcr &= ~UART_MCR_AFE; |
536 | 537 | ||
537 | serial_out(up, UART_LCR, cval | UART_LCR_DLAB);/* set DLAB */ | 538 | serial_out(up, UART_LCR, cval | UART_LCR_DLAB); /* set DLAB */ |
538 | serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */ | 539 | serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */ |
540 | |||
541 | /* | ||
542 | * work around Errata #75 according to Intel(R) PXA27x Processor Family | ||
543 | * Specification Update (Nov 2005) | ||
544 | */ | ||
545 | dll = serial_in(up, UART_DLL); | ||
546 | WARN_ON(dll != (quot & 0xff)); | ||
547 | |||
539 | serial_out(up, UART_DLM, quot >> 8); /* MS of divisor */ | 548 | serial_out(up, UART_DLM, quot >> 8); /* MS of divisor */ |
540 | serial_out(up, UART_LCR, cval); /* reset DLAB */ | 549 | serial_out(up, UART_LCR, cval); /* reset DLAB */ |
541 | up->lcr = cval; /* Save LCR */ | 550 | up->lcr = cval; /* Save LCR */ |
542 | serial_pxa_set_mctrl(&up->port, up->port.mctrl); | 551 | serial_pxa_set_mctrl(&up->port, up->port.mctrl); |
543 | serial_out(up, UART_FCR, fcr); | 552 | serial_out(up, UART_FCR, fcr); |