diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250.c | 4 | ||||
-rw-r--r-- | drivers/serial/8250.h | 5 | ||||
-rw-r--r-- | drivers/serial/8250_pci.c | 7 | ||||
-rw-r--r-- | drivers/serial/atmel_serial.c | 2 | ||||
-rw-r--r-- | drivers/serial/bfin_5xx.c | 40 | ||||
-rw-r--r-- | drivers/serial/sb1250-duart.c | 2 | ||||
-rw-r--r-- | drivers/serial/serial_core.c | 15 | ||||
-rw-r--r-- | drivers/serial/ucc_uart.c | 2 |
8 files changed, 34 insertions, 43 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 1400ea6a2491..1bc00b721e9d 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | #include <asm/io.h> | 44 | #include <asm/io.h> |
45 | #include <asm/irq.h> | 45 | #include <asm/irq.h> |
46 | #include <asm/serial.h> | ||
47 | 46 | ||
48 | #include "8250.h" | 47 | #include "8250.h" |
49 | 48 | ||
@@ -93,6 +92,7 @@ static unsigned int nr_uarts = CONFIG_SERIAL_8250_RUNTIME_UARTS; | |||
93 | */ | 92 | */ |
94 | #define CONFIG_HUB6 1 | 93 | #define CONFIG_HUB6 1 |
95 | 94 | ||
95 | #include <asm/serial.h> | ||
96 | /* | 96 | /* |
97 | * SERIAL_PORT_DFNS tells us about built-in ports that have no | 97 | * SERIAL_PORT_DFNS tells us about built-in ports that have no |
98 | * standard enumeration mechanism. Platforms that can find all | 98 | * standard enumeration mechanism. Platforms that can find all |
@@ -1547,8 +1547,6 @@ static int serial_link_irq_chain(struct uart_8250_port *up) | |||
1547 | i->head = &up->list; | 1547 | i->head = &up->list; |
1548 | spin_unlock_irq(&i->lock); | 1548 | spin_unlock_irq(&i->lock); |
1549 | 1549 | ||
1550 | irq_flags |= SERIAL_EXTRA_IRQ_FLAGS; | ||
1551 | |||
1552 | ret = request_irq(up->port.irq, serial8250_interrupt, | 1550 | ret = request_irq(up->port.irq, serial8250_interrupt, |
1553 | irq_flags, "serial", i); | 1551 | irq_flags, "serial", i); |
1554 | if (ret < 0) | 1552 | if (ret < 0) |
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h index a10a40cc0d9e..91bd28f2bb47 100644 --- a/drivers/serial/8250.h +++ b/drivers/serial/8250.h | |||
@@ -78,8 +78,3 @@ struct serial8250_config { | |||
78 | #else | 78 | #else |
79 | #define ALPHA_KLUDGE_MCR 0 | 79 | #define ALPHA_KLUDGE_MCR 0 |
80 | #endif | 80 | #endif |
81 | |||
82 | #ifndef SERIAL_EXTRA_IRQ_FLAGS | ||
83 | #define SERIAL_EXTRA_IRQ_FLAGS 0 | ||
84 | #endif | ||
85 | |||
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 53fa19cf2f06..788c3559522d 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -2602,7 +2602,12 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
2602 | { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200, | 2602 | { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS200, |
2603 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */ | 2603 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0811 */ |
2604 | pbn_b2_2_115200 }, | 2604 | pbn_b2_2_115200 }, |
2605 | 2605 | /* | |
2606 | * IntaShield IS-400 | ||
2607 | */ | ||
2608 | { PCI_VENDOR_ID_INTASHIELD, PCI_DEVICE_ID_INTASHIELD_IS400, | ||
2609 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, /* 135a.0dc0 */ | ||
2610 | pbn_b2_4_115200 }, | ||
2606 | /* | 2611 | /* |
2607 | * Perle PCI-RAS cards | 2612 | * Perle PCI-RAS cards |
2608 | */ | 2613 | */ |
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index c065a704a93a..42be8b01a40f 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -1318,7 +1318,7 @@ static void __init atmel_console_get_options(struct uart_port *port, int *baud, | |||
1318 | * If the baud rate generator isn't running, the port wasn't | 1318 | * If the baud rate generator isn't running, the port wasn't |
1319 | * initialized by the boot loader. | 1319 | * initialized by the boot loader. |
1320 | */ | 1320 | */ |
1321 | quot = UART_GET_BRGR(port); | 1321 | quot = UART_GET_BRGR(port) & ATMEL_US_CD; |
1322 | if (!quot) | 1322 | if (!quot) |
1323 | return; | 1323 | return; |
1324 | 1324 | ||
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index d6b4ead693b7..f20952c43cb8 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -530,11 +530,7 @@ static unsigned int bfin_serial_get_mctrl(struct uart_port *port) | |||
530 | if (uart->cts_pin < 0) | 530 | if (uart->cts_pin < 0) |
531 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; | 531 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; |
532 | 532 | ||
533 | # ifdef BF54x | 533 | if (UART_GET_CTS(uart)) |
534 | if (UART_GET_MSR(uart) & CTS) | ||
535 | # else | ||
536 | if (gpio_get_value(uart->cts_pin)) | ||
537 | # endif | ||
538 | return TIOCM_DSR | TIOCM_CAR; | 534 | return TIOCM_DSR | TIOCM_CAR; |
539 | else | 535 | else |
540 | #endif | 536 | #endif |
@@ -549,17 +545,9 @@ static void bfin_serial_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
549 | return; | 545 | return; |
550 | 546 | ||
551 | if (mctrl & TIOCM_RTS) | 547 | if (mctrl & TIOCM_RTS) |
552 | # ifdef BF54x | 548 | UART_CLEAR_RTS(uart); |
553 | UART_PUT_MCR(uart, UART_GET_MCR(uart) & ~MRTS); | ||
554 | # else | ||
555 | gpio_set_value(uart->rts_pin, 0); | ||
556 | # endif | ||
557 | else | 549 | else |
558 | # ifdef BF54x | 550 | UART_SET_RTS(uart); |
559 | UART_PUT_MCR(uart, UART_GET_MCR(uart) | MRTS); | ||
560 | # else | ||
561 | gpio_set_value(uart->rts_pin, 1); | ||
562 | # endif | ||
563 | #endif | 551 | #endif |
564 | } | 552 | } |
565 | 553 | ||
@@ -752,11 +740,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, | |||
752 | 740 | ||
753 | /* Disable UART */ | 741 | /* Disable UART */ |
754 | ier = UART_GET_IER(uart); | 742 | ier = UART_GET_IER(uart); |
755 | #ifdef CONFIG_BF54x | 743 | UART_DISABLE_INTS(uart); |
756 | UART_CLEAR_IER(uart, 0xF); | ||
757 | #else | ||
758 | UART_PUT_IER(uart, 0); | ||
759 | #endif | ||
760 | 744 | ||
761 | /* Set DLAB in LCR to Access DLL and DLH */ | 745 | /* Set DLAB in LCR to Access DLL and DLH */ |
762 | UART_SET_DLAB(uart); | 746 | UART_SET_DLAB(uart); |
@@ -771,11 +755,7 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, | |||
771 | UART_PUT_LCR(uart, lcr); | 755 | UART_PUT_LCR(uart, lcr); |
772 | 756 | ||
773 | /* Enable UART */ | 757 | /* Enable UART */ |
774 | #ifdef CONFIG_BF54x | 758 | UART_ENABLE_INTS(uart, ier); |
775 | UART_SET_IER(uart, ier); | ||
776 | #else | ||
777 | UART_PUT_IER(uart, ier); | ||
778 | #endif | ||
779 | 759 | ||
780 | val = UART_GET_GCTL(uart); | 760 | val = UART_GET_GCTL(uart); |
781 | val |= UCEN; | 761 | val |= UCEN; |
@@ -833,15 +813,15 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser) | |||
833 | * Enable the IrDA function if tty->ldisc.num is N_IRDA. | 813 | * Enable the IrDA function if tty->ldisc.num is N_IRDA. |
834 | * In other cases, disable IrDA function. | 814 | * In other cases, disable IrDA function. |
835 | */ | 815 | */ |
836 | static void bfin_set_ldisc(struct tty_struct *tty) | 816 | static void bfin_serial_set_ldisc(struct uart_port *port) |
837 | { | 817 | { |
838 | int line = tty->index; | 818 | int line = port->line; |
839 | unsigned short val; | 819 | unsigned short val; |
840 | 820 | ||
841 | if (line >= tty->driver->num) | 821 | if (line >= port->info->tty->driver->num) |
842 | return; | 822 | return; |
843 | 823 | ||
844 | switch (tty->ldisc.num) { | 824 | switch (port->info->tty->ldisc.num) { |
845 | case N_IRDA: | 825 | case N_IRDA: |
846 | val = UART_GET_GCTL(&bfin_serial_ports[line]); | 826 | val = UART_GET_GCTL(&bfin_serial_ports[line]); |
847 | val |= (IREN | RPOLC); | 827 | val |= (IREN | RPOLC); |
@@ -866,6 +846,7 @@ static struct uart_ops bfin_serial_pops = { | |||
866 | .startup = bfin_serial_startup, | 846 | .startup = bfin_serial_startup, |
867 | .shutdown = bfin_serial_shutdown, | 847 | .shutdown = bfin_serial_shutdown, |
868 | .set_termios = bfin_serial_set_termios, | 848 | .set_termios = bfin_serial_set_termios, |
849 | .set_ldisc = bfin_serial_set_ldisc, | ||
869 | .type = bfin_serial_type, | 850 | .type = bfin_serial_type, |
870 | .release_port = bfin_serial_release_port, | 851 | .release_port = bfin_serial_release_port, |
871 | .request_port = bfin_serial_request_port, | 852 | .request_port = bfin_serial_request_port, |
@@ -1206,7 +1187,6 @@ static int __init bfin_serial_init(void) | |||
1206 | 1187 | ||
1207 | ret = uart_register_driver(&bfin_serial_reg); | 1188 | ret = uart_register_driver(&bfin_serial_reg); |
1208 | if (ret == 0) { | 1189 | if (ret == 0) { |
1209 | bfin_serial_reg.tty_driver->set_ldisc = bfin_set_ldisc; | ||
1210 | ret = platform_driver_register(&bfin_serial_driver); | 1190 | ret = platform_driver_register(&bfin_serial_driver); |
1211 | if (ret) { | 1191 | if (ret) { |
1212 | pr_debug("uart register failed\n"); | 1192 | pr_debug("uart register failed\n"); |
diff --git a/drivers/serial/sb1250-duart.c b/drivers/serial/sb1250-duart.c index 2d6c08b3dbcf..f8e1447a022a 100644 --- a/drivers/serial/sb1250-duart.c +++ b/drivers/serial/sb1250-duart.c | |||
@@ -924,7 +924,7 @@ console_initcall(sbd_serial_console_init); | |||
924 | 924 | ||
925 | static struct uart_driver sbd_reg = { | 925 | static struct uart_driver sbd_reg = { |
926 | .owner = THIS_MODULE, | 926 | .owner = THIS_MODULE, |
927 | .driver_name = "serial", | 927 | .driver_name = "sb1250_duart", |
928 | .dev_name = "duart", | 928 | .dev_name = "duart", |
929 | .major = TTY_MAJOR, | 929 | .major = TTY_MAJOR, |
930 | .minor = SB1250_DUART_MINOR_BASE, | 930 | .minor = SB1250_DUART_MINOR_BASE, |
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index eab032733790..c9b64e73c987 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -1165,6 +1165,15 @@ out: | |||
1165 | return ret; | 1165 | return ret; |
1166 | } | 1166 | } |
1167 | 1167 | ||
1168 | static void uart_set_ldisc(struct tty_struct *tty) | ||
1169 | { | ||
1170 | struct uart_state *state = tty->driver_data; | ||
1171 | struct uart_port *port = state->port; | ||
1172 | |||
1173 | if (port->ops->set_ldisc) | ||
1174 | port->ops->set_ldisc(port); | ||
1175 | } | ||
1176 | |||
1168 | static void uart_set_termios(struct tty_struct *tty, | 1177 | static void uart_set_termios(struct tty_struct *tty, |
1169 | struct ktermios *old_termios) | 1178 | struct ktermios *old_termios) |
1170 | { | 1179 | { |
@@ -2054,6 +2063,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) | |||
2054 | int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | 2063 | int uart_resume_port(struct uart_driver *drv, struct uart_port *port) |
2055 | { | 2064 | { |
2056 | struct uart_state *state = drv->state + port->line; | 2065 | struct uart_state *state = drv->state + port->line; |
2066 | struct device *tty_dev; | ||
2067 | struct uart_match match = {port, drv}; | ||
2057 | 2068 | ||
2058 | mutex_lock(&state->mutex); | 2069 | mutex_lock(&state->mutex); |
2059 | 2070 | ||
@@ -2063,7 +2074,8 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | |||
2063 | return 0; | 2074 | return 0; |
2064 | } | 2075 | } |
2065 | 2076 | ||
2066 | if (!port->suspended) { | 2077 | tty_dev = device_find_child(port->dev, &match, serial_match_port); |
2078 | if (!port->suspended && device_may_wakeup(tty_dev)) { | ||
2067 | disable_irq_wake(port->irq); | 2079 | disable_irq_wake(port->irq); |
2068 | mutex_unlock(&state->mutex); | 2080 | mutex_unlock(&state->mutex); |
2069 | return 0; | 2081 | return 0; |
@@ -2285,6 +2297,7 @@ static const struct tty_operations uart_ops = { | |||
2285 | .unthrottle = uart_unthrottle, | 2297 | .unthrottle = uart_unthrottle, |
2286 | .send_xchar = uart_send_xchar, | 2298 | .send_xchar = uart_send_xchar, |
2287 | .set_termios = uart_set_termios, | 2299 | .set_termios = uart_set_termios, |
2300 | .set_ldisc = uart_set_ldisc, | ||
2288 | .stop = uart_stop, | 2301 | .stop = uart_stop, |
2289 | .start = uart_start, | 2302 | .start = uart_start, |
2290 | .hangup = uart_hangup, | 2303 | .hangup = uart_hangup, |
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 01917c433f17..566a8b42e05a 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c | |||
@@ -195,7 +195,7 @@ struct uart_qe_port { | |||
195 | 195 | ||
196 | static struct uart_driver ucc_uart_driver = { | 196 | static struct uart_driver ucc_uart_driver = { |
197 | .owner = THIS_MODULE, | 197 | .owner = THIS_MODULE, |
198 | .driver_name = "serial", | 198 | .driver_name = "ucc_uart", |
199 | .dev_name = "ttyQE", | 199 | .dev_name = "ttyQE", |
200 | .major = SERIAL_QE_MAJOR, | 200 | .major = SERIAL_QE_MAJOR, |
201 | .minor = SERIAL_QE_MINOR, | 201 | .minor = SERIAL_QE_MINOR, |