diff options
Diffstat (limited to 'drivers/serial/bfin_5xx.c')
-rw-r--r-- | drivers/serial/bfin_5xx.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index af866ab3f5a1..69ac7007682e 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -579,7 +579,11 @@ static unsigned int bfin_serial_get_mctrl(struct uart_port *port) | |||
579 | if (uart->cts_pin < 0) | 579 | if (uart->cts_pin < 0) |
580 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; | 580 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; |
581 | 581 | ||
582 | # ifdef BF54x | ||
583 | if (UART_GET_MSR(uart) & CTS) | ||
584 | # else | ||
582 | if (gpio_get_value(uart->cts_pin)) | 585 | if (gpio_get_value(uart->cts_pin)) |
586 | # endif | ||
583 | return TIOCM_DSR | TIOCM_CAR; | 587 | return TIOCM_DSR | TIOCM_CAR; |
584 | else | 588 | else |
585 | #endif | 589 | #endif |
@@ -594,9 +598,17 @@ static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
594 | return; | 598 | return; |
595 | 599 | ||
596 | if (mctrl & TIOCM_RTS) | 600 | if (mctrl & TIOCM_RTS) |
601 | # ifdef BF54x | ||
602 | UART_PUT_MCR(uart, UART_GET_MCR(uart) & ~MRTS); | ||
603 | # else | ||
597 | gpio_set_value(uart->rts_pin, 0); | 604 | gpio_set_value(uart->rts_pin, 0); |
605 | # endif | ||
598 | else | 606 | else |
607 | # ifdef BF54x | ||
608 | UART_PUT_MCR(uart, UART_GET_MCR(uart) | MRTS); | ||
609 | # else | ||
599 | gpio_set_value(uart->rts_pin, 1); | 610 | gpio_set_value(uart->rts_pin, 1); |
611 | # endif | ||
600 | #endif | 612 | #endif |
601 | } | 613 | } |
602 | 614 | ||