diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/amba-pl010.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 429a8ae86933..e4b3c2c88bb6 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -471,6 +471,20 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios, | |||
471 | spin_unlock_irqrestore(&uap->port.lock, flags); | 471 | spin_unlock_irqrestore(&uap->port.lock, flags); |
472 | } | 472 | } |
473 | 473 | ||
474 | static void pl010_set_ldisc(struct uart_port *port) | ||
475 | { | ||
476 | int line = port->line; | ||
477 | |||
478 | if (line >= port->state->port.tty->driver->num) | ||
479 | return; | ||
480 | |||
481 | if (port->state->port.tty->ldisc->ops->num == N_PPS) { | ||
482 | port->flags |= UPF_HARDPPS_CD; | ||
483 | pl010_enable_ms(port); | ||
484 | } else | ||
485 | port->flags &= ~UPF_HARDPPS_CD; | ||
486 | } | ||
487 | |||
474 | static const char *pl010_type(struct uart_port *port) | 488 | static const char *pl010_type(struct uart_port *port) |
475 | { | 489 | { |
476 | return port->type == PORT_AMBA ? "AMBA" : NULL; | 490 | return port->type == PORT_AMBA ? "AMBA" : NULL; |
@@ -531,6 +545,7 @@ static struct uart_ops amba_pl010_pops = { | |||
531 | .startup = pl010_startup, | 545 | .startup = pl010_startup, |
532 | .shutdown = pl010_shutdown, | 546 | .shutdown = pl010_shutdown, |
533 | .set_termios = pl010_set_termios, | 547 | .set_termios = pl010_set_termios, |
548 | .set_ldisc = pl010_set_ldisc, | ||
534 | .type = pl010_type, | 549 | .type = pl010_type, |
535 | .release_port = pl010_release_port, | 550 | .release_port = pl010_release_port, |
536 | .request_port = pl010_request_port, | 551 | .request_port = pl010_request_port, |