diff options
author | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-02 03:53:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-02 03:53:36 -0400 |
commit | 138307b475286a5bcc985b06b3e71fcd33dd5e2c (patch) | |
tree | e025c7cb26396b07f157eea20a1cfb037b66758f /drivers | |
parent | 66f3767376e2bbffb4c2c78ea171e1fdcb62201b (diff) | |
parent | bc49a661e6e82bfa8219c3d0a2e4dea51c847d23 (diff) |
Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-serial
Diffstat (limited to 'drivers')
37 files changed, 176 insertions, 372 deletions
diff --git a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c index d568991ac6b3..8666171e187b 100644 --- a/drivers/char/mwave/mwavedd.c +++ b/drivers/char/mwave/mwavedd.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/sched.h> | 57 | #include <linux/sched.h> |
58 | #include <linux/spinlock.h> | 58 | #include <linux/spinlock.h> |
59 | #include <linux/delay.h> | 59 | #include <linux/delay.h> |
60 | #include <linux/serial_8250.h> | ||
60 | #include "smapi.h" | 61 | #include "smapi.h" |
61 | #include "mwavedd.h" | 62 | #include "mwavedd.h" |
62 | #include "3780i.h" | 63 | #include "3780i.h" |
@@ -410,8 +411,8 @@ static ssize_t mwave_write(struct file *file, const char __user *buf, | |||
410 | 411 | ||
411 | static int register_serial_portandirq(unsigned int port, int irq) | 412 | static int register_serial_portandirq(unsigned int port, int irq) |
412 | { | 413 | { |
413 | struct serial_struct serial; | 414 | struct uart_port uart; |
414 | 415 | ||
415 | switch ( port ) { | 416 | switch ( port ) { |
416 | case 0x3f8: | 417 | case 0x3f8: |
417 | case 0x2f8: | 418 | case 0x2f8: |
@@ -442,12 +443,14 @@ static int register_serial_portandirq(unsigned int port, int irq) | |||
442 | } /* switch */ | 443 | } /* switch */ |
443 | /* irq is okay */ | 444 | /* irq is okay */ |
444 | 445 | ||
445 | memset(&serial, 0, sizeof(serial)); | 446 | memset(&uart, 0, sizeof(struct uart_port)); |
446 | serial.port = port; | 447 | |
447 | serial.irq = irq; | 448 | uart.uartclk = 1843200; |
448 | serial.flags = ASYNC_SHARE_IRQ; | 449 | uart.iobase = port; |
449 | 450 | uart.irq = irq; | |
450 | return register_serial(&serial); | 451 | uart.iotype = UPIO_PORT; |
452 | uart.flags = UPF_SHARE_IRQ; | ||
453 | return serial8250_register_port(&uart); | ||
451 | } | 454 | } |
452 | 455 | ||
453 | 456 | ||
@@ -523,7 +526,7 @@ static void mwave_exit(void) | |||
523 | #endif | 526 | #endif |
524 | 527 | ||
525 | if ( pDrvData->sLine >= 0 ) { | 528 | if ( pDrvData->sLine >= 0 ) { |
526 | unregister_serial(pDrvData->sLine); | 529 | serial8250_unregister_port(pDrvData->sLine); |
527 | } | 530 | } |
528 | if (pDrvData->bMwaveDevRegistered) { | 531 | if (pDrvData->bMwaveDevRegistered) { |
529 | misc_deregister(&mwave_misc_dev); | 532 | misc_deregister(&mwave_misc_dev); |
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 7fc692a8f5b0..dea6589d1533 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -6,7 +6,7 @@ menu "Misc devices" | |||
6 | 6 | ||
7 | config IBM_ASM | 7 | config IBM_ASM |
8 | tristate "Device driver for IBM RSA service processor" | 8 | tristate "Device driver for IBM RSA service processor" |
9 | depends on X86 && PCI && EXPERIMENTAL | 9 | depends on X86 && PCI && EXPERIMENTAL && BROKEN |
10 | ---help--- | 10 | ---help--- |
11 | This option enables device driver support for in-band access to the | 11 | This option enables device driver support for in-band access to the |
12 | IBM RSA (Condor) service processor in eServer xSeries systems. | 12 | IBM RSA (Condor) service processor in eServer xSeries systems. |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index e0239a10d325..7d8bcb38797a 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -447,7 +447,7 @@ config NET_SB1250_MAC | |||
447 | 447 | ||
448 | config SGI_IOC3_ETH | 448 | config SGI_IOC3_ETH |
449 | bool "SGI IOC3 Ethernet" | 449 | bool "SGI IOC3 Ethernet" |
450 | depends on NET_ETHERNET && PCI && SGI_IP27 | 450 | depends on NET_ETHERNET && PCI && SGI_IP27 && BROKEN |
451 | select CRC32 | 451 | select CRC32 |
452 | select MII | 452 | select MII |
453 | help | 453 | help |
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c index 0b10169961eb..aec39fb261ca 100644 --- a/drivers/serial/21285.c +++ b/drivers/serial/21285.c | |||
@@ -58,8 +58,7 @@ static const char serial21285_name[] = "Footbridge UART"; | |||
58 | * int((BAUD_BASE - (baud >> 1)) / baud) | 58 | * int((BAUD_BASE - (baud >> 1)) / baud) |
59 | */ | 59 | */ |
60 | 60 | ||
61 | static void | 61 | static void serial21285_stop_tx(struct uart_port *port) |
62 | serial21285_stop_tx(struct uart_port *port, unsigned int tty_stop) | ||
63 | { | 62 | { |
64 | if (tx_enabled(port)) { | 63 | if (tx_enabled(port)) { |
65 | disable_irq(IRQ_CONTX); | 64 | disable_irq(IRQ_CONTX); |
@@ -67,8 +66,7 @@ serial21285_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
67 | } | 66 | } |
68 | } | 67 | } |
69 | 68 | ||
70 | static void | 69 | static void serial21285_start_tx(struct uart_port *port) |
71 | serial21285_start_tx(struct uart_port *port, unsigned int tty_start) | ||
72 | { | 70 | { |
73 | if (!tx_enabled(port)) { | 71 | if (!tx_enabled(port)) { |
74 | enable_irq(IRQ_CONTX); | 72 | enable_irq(IRQ_CONTX); |
@@ -148,7 +146,7 @@ static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *r | |||
148 | goto out; | 146 | goto out; |
149 | } | 147 | } |
150 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 148 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
151 | serial21285_stop_tx(port, 0); | 149 | serial21285_stop_tx(port); |
152 | goto out; | 150 | goto out; |
153 | } | 151 | } |
154 | 152 | ||
@@ -164,7 +162,7 @@ static irqreturn_t serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *r | |||
164 | uart_write_wakeup(port); | 162 | uart_write_wakeup(port); |
165 | 163 | ||
166 | if (uart_circ_empty(xmit)) | 164 | if (uart_circ_empty(xmit)) |
167 | serial21285_stop_tx(port, 0); | 165 | serial21285_stop_tx(port); |
168 | 166 | ||
169 | out: | 167 | out: |
170 | return IRQ_HANDLED; | 168 | return IRQ_HANDLED; |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 7e8fc7c1d4cc..30a0a3d10145 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -1001,7 +1001,7 @@ static inline void __stop_tx(struct uart_8250_port *p) | |||
1001 | } | 1001 | } |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) | 1004 | static void serial8250_stop_tx(struct uart_port *port) |
1005 | { | 1005 | { |
1006 | struct uart_8250_port *up = (struct uart_8250_port *)port; | 1006 | struct uart_8250_port *up = (struct uart_8250_port *)port; |
1007 | 1007 | ||
@@ -1018,7 +1018,7 @@ static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
1018 | 1018 | ||
1019 | static void transmit_chars(struct uart_8250_port *up); | 1019 | static void transmit_chars(struct uart_8250_port *up); |
1020 | 1020 | ||
1021 | static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start) | 1021 | static void serial8250_start_tx(struct uart_port *port) |
1022 | { | 1022 | { |
1023 | struct uart_8250_port *up = (struct uart_8250_port *)port; | 1023 | struct uart_8250_port *up = (struct uart_8250_port *)port; |
1024 | 1024 | ||
@@ -1158,7 +1158,11 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) | |||
1158 | up->port.x_char = 0; | 1158 | up->port.x_char = 0; |
1159 | return; | 1159 | return; |
1160 | } | 1160 | } |
1161 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 1161 | if (uart_tx_stopped(&up->port)) { |
1162 | serial8250_stop_tx(&up->port); | ||
1163 | return; | ||
1164 | } | ||
1165 | if (uart_circ_empty(xmit)) { | ||
1162 | __stop_tx(up); | 1166 | __stop_tx(up); |
1163 | return; | 1167 | return; |
1164 | } | 1168 | } |
@@ -2586,82 +2590,3 @@ module_param_array(probe_rsa, ulong, &probe_rsa_count, 0444); | |||
2586 | MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); | 2590 | MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); |
2587 | #endif | 2591 | #endif |
2588 | MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); | 2592 | MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); |
2589 | |||
2590 | /** | ||
2591 | * register_serial - configure a 16x50 serial port at runtime | ||
2592 | * @req: request structure | ||
2593 | * | ||
2594 | * Configure the serial port specified by the request. If the | ||
2595 | * port exists and is in use an error is returned. If the port | ||
2596 | * is not currently in the table it is added. | ||
2597 | * | ||
2598 | * The port is then probed and if necessary the IRQ is autodetected | ||
2599 | * If this fails an error is returned. | ||
2600 | * | ||
2601 | * On success the port is ready to use and the line number is returned. | ||
2602 | * | ||
2603 | * Note: this function is deprecated - use serial8250_register_port | ||
2604 | * instead. | ||
2605 | */ | ||
2606 | int register_serial(struct serial_struct *req) | ||
2607 | { | ||
2608 | struct uart_port port; | ||
2609 | |||
2610 | port.iobase = req->port; | ||
2611 | port.membase = req->iomem_base; | ||
2612 | port.irq = req->irq; | ||
2613 | port.uartclk = req->baud_base * 16; | ||
2614 | port.fifosize = req->xmit_fifo_size; | ||
2615 | port.regshift = req->iomem_reg_shift; | ||
2616 | port.iotype = req->io_type; | ||
2617 | port.flags = req->flags | UPF_BOOT_AUTOCONF; | ||
2618 | port.mapbase = req->iomap_base; | ||
2619 | port.dev = NULL; | ||
2620 | |||
2621 | if (share_irqs) | ||
2622 | port.flags |= UPF_SHARE_IRQ; | ||
2623 | |||
2624 | if (HIGH_BITS_OFFSET) | ||
2625 | port.iobase |= (long) req->port_high << HIGH_BITS_OFFSET; | ||
2626 | |||
2627 | /* | ||
2628 | * If a clock rate wasn't specified by the low level driver, then | ||
2629 | * default to the standard clock rate. This should be 115200 (*16) | ||
2630 | * and should not depend on the architecture's BASE_BAUD definition. | ||
2631 | * However, since this API will be deprecated, it's probably a | ||
2632 | * better idea to convert the drivers to use the new API | ||
2633 | * (serial8250_register_port and serial8250_unregister_port). | ||
2634 | */ | ||
2635 | if (port.uartclk == 0) { | ||
2636 | printk(KERN_WARNING | ||
2637 | "Serial: registering port at [%08x,%08lx,%p] irq %d with zero baud_base\n", | ||
2638 | port.iobase, port.mapbase, port.membase, port.irq); | ||
2639 | printk(KERN_WARNING "Serial: see %s:%d for more information\n", | ||
2640 | __FILE__, __LINE__); | ||
2641 | dump_stack(); | ||
2642 | |||
2643 | /* | ||
2644 | * Fix it up for now, but this is only a temporary measure. | ||
2645 | */ | ||
2646 | port.uartclk = BASE_BAUD * 16; | ||
2647 | } | ||
2648 | |||
2649 | return serial8250_register_port(&port); | ||
2650 | } | ||
2651 | EXPORT_SYMBOL(register_serial); | ||
2652 | |||
2653 | /** | ||
2654 | * unregister_serial - remove a 16x50 serial port at runtime | ||
2655 | * @line: serial line number | ||
2656 | * | ||
2657 | * Remove one serial port. This may not be called from interrupt | ||
2658 | * context. We hand the port back to our local PM control. | ||
2659 | * | ||
2660 | * Note: this function is deprecated - use serial8250_unregister_port | ||
2661 | * instead. | ||
2662 | */ | ||
2663 | void unregister_serial(int line) | ||
2664 | { | ||
2665 | serial8250_unregister_port(line); | ||
2666 | } | ||
2667 | EXPORT_SYMBOL(unregister_serial); | ||
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h index 9225c82faeb8..b1b459efda52 100644 --- a/drivers/serial/8250.h +++ b/drivers/serial/8250.h | |||
@@ -16,11 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | 18 | #include <linux/config.h> |
19 | 19 | #include <linux/serial_8250.h> | |
20 | int serial8250_register_port(struct uart_port *); | ||
21 | void serial8250_unregister_port(int line); | ||
22 | void serial8250_suspend_port(int line); | ||
23 | void serial8250_resume_port(int line); | ||
24 | 20 | ||
25 | struct old_serial_port { | 21 | struct old_serial_port { |
26 | unsigned int uart; | 22 | unsigned int uart; |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index d5797618a3b9..74b80f7c062d 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -830,7 +830,7 @@ config SERIAL_M32R_PLDSIO | |||
830 | 830 | ||
831 | config SERIAL_TXX9 | 831 | config SERIAL_TXX9 |
832 | bool "TMPTX39XX/49XX SIO support" | 832 | bool "TMPTX39XX/49XX SIO support" |
833 | depends HAS_TXX9_SERIAL | 833 | depends HAS_TXX9_SERIAL && BROKEN |
834 | select SERIAL_CORE | 834 | select SERIAL_CORE |
835 | default y | 835 | default y |
836 | 836 | ||
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 2884b310e54d..978e12437e61 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -105,7 +105,7 @@ struct uart_amba_port { | |||
105 | unsigned int old_status; | 105 | unsigned int old_status; |
106 | }; | 106 | }; |
107 | 107 | ||
108 | static void pl010_stop_tx(struct uart_port *port, unsigned int tty_stop) | 108 | static void pl010_stop_tx(struct uart_port *port) |
109 | { | 109 | { |
110 | unsigned int cr; | 110 | unsigned int cr; |
111 | 111 | ||
@@ -114,7 +114,7 @@ static void pl010_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
114 | UART_PUT_CR(port, cr); | 114 | UART_PUT_CR(port, cr); |
115 | } | 115 | } |
116 | 116 | ||
117 | static void pl010_start_tx(struct uart_port *port, unsigned int tty_start) | 117 | static void pl010_start_tx(struct uart_port *port) |
118 | { | 118 | { |
119 | unsigned int cr; | 119 | unsigned int cr; |
120 | 120 | ||
@@ -219,7 +219,7 @@ static void pl010_tx_chars(struct uart_port *port) | |||
219 | return; | 219 | return; |
220 | } | 220 | } |
221 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 221 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
222 | pl010_stop_tx(port, 0); | 222 | pl010_stop_tx(port); |
223 | return; | 223 | return; |
224 | } | 224 | } |
225 | 225 | ||
@@ -236,7 +236,7 @@ static void pl010_tx_chars(struct uart_port *port) | |||
236 | uart_write_wakeup(port); | 236 | uart_write_wakeup(port); |
237 | 237 | ||
238 | if (uart_circ_empty(xmit)) | 238 | if (uart_circ_empty(xmit)) |
239 | pl010_stop_tx(port, 0); | 239 | pl010_stop_tx(port); |
240 | } | 240 | } |
241 | 241 | ||
242 | static void pl010_modem_status(struct uart_port *port) | 242 | static void pl010_modem_status(struct uart_port *port) |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 7db88ee18f75..56071309744c 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -74,7 +74,7 @@ struct uart_amba_port { | |||
74 | unsigned int old_status; | 74 | unsigned int old_status; |
75 | }; | 75 | }; |
76 | 76 | ||
77 | static void pl011_stop_tx(struct uart_port *port, unsigned int tty_stop) | 77 | static void pl011_stop_tx(struct uart_port *port) |
78 | { | 78 | { |
79 | struct uart_amba_port *uap = (struct uart_amba_port *)port; | 79 | struct uart_amba_port *uap = (struct uart_amba_port *)port; |
80 | 80 | ||
@@ -82,7 +82,7 @@ static void pl011_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
82 | writew(uap->im, uap->port.membase + UART011_IMSC); | 82 | writew(uap->im, uap->port.membase + UART011_IMSC); |
83 | } | 83 | } |
84 | 84 | ||
85 | static void pl011_start_tx(struct uart_port *port, unsigned int tty_start) | 85 | static void pl011_start_tx(struct uart_port *port) |
86 | { | 86 | { |
87 | struct uart_amba_port *uap = (struct uart_amba_port *)port; | 87 | struct uart_amba_port *uap = (struct uart_amba_port *)port; |
88 | 88 | ||
@@ -184,7 +184,7 @@ static void pl011_tx_chars(struct uart_amba_port *uap) | |||
184 | return; | 184 | return; |
185 | } | 185 | } |
186 | if (uart_circ_empty(xmit) || uart_tx_stopped(&uap->port)) { | 186 | if (uart_circ_empty(xmit) || uart_tx_stopped(&uap->port)) { |
187 | pl011_stop_tx(&uap->port, 0); | 187 | pl011_stop_tx(&uap->port); |
188 | return; | 188 | return; |
189 | } | 189 | } |
190 | 190 | ||
@@ -201,7 +201,7 @@ static void pl011_tx_chars(struct uart_amba_port *uap) | |||
201 | uart_write_wakeup(&uap->port); | 201 | uart_write_wakeup(&uap->port); |
202 | 202 | ||
203 | if (uart_circ_empty(xmit)) | 203 | if (uart_circ_empty(xmit)) |
204 | pl011_stop_tx(&uap->port, 0); | 204 | pl011_stop_tx(&uap->port); |
205 | } | 205 | } |
206 | 206 | ||
207 | static void pl011_modem_status(struct uart_amba_port *uap) | 207 | static void pl011_modem_status(struct uart_amba_port *uap) |
diff --git a/drivers/serial/au1x00_uart.c b/drivers/serial/au1x00_uart.c index 6104aeef1243..a274ebf256a1 100644 --- a/drivers/serial/au1x00_uart.c +++ b/drivers/serial/au1x00_uart.c | |||
@@ -200,7 +200,7 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags) | |||
200 | DEBUG_AUTOCONF("type=%s\n", uart_config[up->port.type].name); | 200 | DEBUG_AUTOCONF("type=%s\n", uart_config[up->port.type].name); |
201 | } | 201 | } |
202 | 202 | ||
203 | static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) | 203 | static void serial8250_stop_tx(struct uart_port *port) |
204 | { | 204 | { |
205 | struct uart_8250_port *up = (struct uart_8250_port *)port; | 205 | struct uart_8250_port *up = (struct uart_8250_port *)port; |
206 | 206 | ||
@@ -210,7 +210,7 @@ static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
210 | } | 210 | } |
211 | } | 211 | } |
212 | 212 | ||
213 | static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start) | 213 | static void serial8250_start_tx(struct uart_port *port) |
214 | { | 214 | { |
215 | struct uart_8250_port *up = (struct uart_8250_port *)port; | 215 | struct uart_8250_port *up = (struct uart_8250_port *)port; |
216 | 216 | ||
@@ -337,7 +337,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) | |||
337 | return; | 337 | return; |
338 | } | 338 | } |
339 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 339 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { |
340 | serial8250_stop_tx(&up->port, 0); | 340 | serial8250_stop_tx(&up->port); |
341 | return; | 341 | return; |
342 | } | 342 | } |
343 | 343 | ||
@@ -356,7 +356,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) | |||
356 | DEBUG_INTR("THRE..."); | 356 | DEBUG_INTR("THRE..."); |
357 | 357 | ||
358 | if (uart_circ_empty(xmit)) | 358 | if (uart_circ_empty(xmit)) |
359 | serial8250_stop_tx(&up->port, 0); | 359 | serial8250_stop_tx(&up->port); |
360 | } | 360 | } |
361 | 361 | ||
362 | static _INLINE_ void check_modem_status(struct uart_8250_port *up) | 362 | static _INLINE_ void check_modem_status(struct uart_8250_port *up) |
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c index e92522b33c48..d822896b488c 100644 --- a/drivers/serial/clps711x.c +++ b/drivers/serial/clps711x.c | |||
@@ -69,8 +69,7 @@ | |||
69 | 69 | ||
70 | #define tx_enabled(port) ((port)->unused[0]) | 70 | #define tx_enabled(port) ((port)->unused[0]) |
71 | 71 | ||
72 | static void | 72 | static void clps711xuart_stop_tx(struct uart_port *port) |
73 | clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop) | ||
74 | { | 73 | { |
75 | if (tx_enabled(port)) { | 74 | if (tx_enabled(port)) { |
76 | disable_irq(TX_IRQ(port)); | 75 | disable_irq(TX_IRQ(port)); |
@@ -78,8 +77,7 @@ clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
78 | } | 77 | } |
79 | } | 78 | } |
80 | 79 | ||
81 | static void | 80 | static void clps711xuart_start_tx(struct uart_port *port) |
82 | clps711xuart_start_tx(struct uart_port *port, unsigned int tty_start) | ||
83 | { | 81 | { |
84 | if (!tx_enabled(port)) { | 82 | if (!tx_enabled(port)) { |
85 | enable_irq(TX_IRQ(port)); | 83 | enable_irq(TX_IRQ(port)); |
@@ -165,7 +163,7 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *re | |||
165 | return IRQ_HANDLED; | 163 | return IRQ_HANDLED; |
166 | } | 164 | } |
167 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 165 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
168 | clps711xuart_stop_tx(port, 0); | 166 | clps711xuart_stop_tx(port); |
169 | return IRQ_HANDLED; | 167 | return IRQ_HANDLED; |
170 | } | 168 | } |
171 | 169 | ||
@@ -182,7 +180,7 @@ static irqreturn_t clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *re | |||
182 | uart_write_wakeup(port); | 180 | uart_write_wakeup(port); |
183 | 181 | ||
184 | if (uart_circ_empty(xmit)) | 182 | if (uart_circ_empty(xmit)) |
185 | clps711xuart_stop_tx(port, 0); | 183 | clps711xuart_stop_tx(port); |
186 | 184 | ||
187 | return IRQ_HANDLED; | 185 | return IRQ_HANDLED; |
188 | } | 186 | } |
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index d639ac92a117..282b32351d8e 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -124,7 +124,7 @@ static unsigned int cpm_uart_get_mctrl(struct uart_port *port) | |||
124 | /* | 124 | /* |
125 | * Stop transmitter | 125 | * Stop transmitter |
126 | */ | 126 | */ |
127 | static void cpm_uart_stop_tx(struct uart_port *port, unsigned int tty_stop) | 127 | static void cpm_uart_stop_tx(struct uart_port *port) |
128 | { | 128 | { |
129 | struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; | 129 | struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; |
130 | volatile smc_t *smcp = pinfo->smcp; | 130 | volatile smc_t *smcp = pinfo->smcp; |
@@ -141,7 +141,7 @@ static void cpm_uart_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
141 | /* | 141 | /* |
142 | * Start transmitter | 142 | * Start transmitter |
143 | */ | 143 | */ |
144 | static void cpm_uart_start_tx(struct uart_port *port, unsigned int tty_start) | 144 | static void cpm_uart_start_tx(struct uart_port *port) |
145 | { | 145 | { |
146 | struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; | 146 | struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; |
147 | volatile smc_t *smcp = pinfo->smcp; | 147 | volatile smc_t *smcp = pinfo->smcp; |
@@ -623,7 +623,7 @@ static int cpm_uart_tx_pump(struct uart_port *port) | |||
623 | } | 623 | } |
624 | 624 | ||
625 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 625 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
626 | cpm_uart_stop_tx(port, 0); | 626 | cpm_uart_stop_tx(port); |
627 | return 0; | 627 | return 0; |
628 | } | 628 | } |
629 | 629 | ||
@@ -656,7 +656,7 @@ static int cpm_uart_tx_pump(struct uart_port *port) | |||
656 | uart_write_wakeup(port); | 656 | uart_write_wakeup(port); |
657 | 657 | ||
658 | if (uart_circ_empty(xmit)) { | 658 | if (uart_circ_empty(xmit)) { |
659 | cpm_uart_stop_tx(port, 0); | 659 | cpm_uart_stop_tx(port); |
660 | return 0; | 660 | return 0; |
661 | } | 661 | } |
662 | 662 | ||
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c index 97824eeeafae..e63b9dffc8d7 100644 --- a/drivers/serial/dz.c +++ b/drivers/serial/dz.c | |||
@@ -112,7 +112,7 @@ static inline void dz_out(struct dz_port *dport, unsigned offset, | |||
112 | * ------------------------------------------------------------ | 112 | * ------------------------------------------------------------ |
113 | */ | 113 | */ |
114 | 114 | ||
115 | static void dz_stop_tx(struct uart_port *uport, unsigned int tty_stop) | 115 | static void dz_stop_tx(struct uart_port *uport) |
116 | { | 116 | { |
117 | struct dz_port *dport = (struct dz_port *)uport; | 117 | struct dz_port *dport = (struct dz_port *)uport; |
118 | unsigned short tmp, mask = 1 << dport->port.line; | 118 | unsigned short tmp, mask = 1 << dport->port.line; |
@@ -125,7 +125,7 @@ static void dz_stop_tx(struct uart_port *uport, unsigned int tty_stop) | |||
125 | spin_unlock_irqrestore(&dport->port.lock, flags); | 125 | spin_unlock_irqrestore(&dport->port.lock, flags); |
126 | } | 126 | } |
127 | 127 | ||
128 | static void dz_start_tx(struct uart_port *uport, unsigned int tty_start) | 128 | static void dz_start_tx(struct uart_port *uport) |
129 | { | 129 | { |
130 | struct dz_port *dport = (struct dz_port *)uport; | 130 | struct dz_port *dport = (struct dz_port *)uport; |
131 | unsigned short tmp, mask = 1 << dport->port.line; | 131 | unsigned short tmp, mask = 1 << dport->port.line; |
@@ -290,7 +290,7 @@ static inline void dz_transmit_chars(struct dz_port *dport) | |||
290 | } | 290 | } |
291 | /* if nothing to do or stopped or hardware stopped */ | 291 | /* if nothing to do or stopped or hardware stopped */ |
292 | if (uart_circ_empty(xmit) || uart_tx_stopped(&dport->port)) { | 292 | if (uart_circ_empty(xmit) || uart_tx_stopped(&dport->port)) { |
293 | dz_stop_tx(&dport->port, 0); | 293 | dz_stop_tx(&dport->port); |
294 | return; | 294 | return; |
295 | } | 295 | } |
296 | 296 | ||
@@ -308,7 +308,7 @@ static inline void dz_transmit_chars(struct dz_port *dport) | |||
308 | 308 | ||
309 | /* Are we done */ | 309 | /* Are we done */ |
310 | if (uart_circ_empty(xmit)) | 310 | if (uart_circ_empty(xmit)) |
311 | dz_stop_tx(&dport->port, 0); | 311 | dz_stop_tx(&dport->port); |
312 | } | 312 | } |
313 | 313 | ||
314 | /* | 314 | /* |
@@ -440,7 +440,7 @@ static int dz_startup(struct uart_port *uport) | |||
440 | */ | 440 | */ |
441 | static void dz_shutdown(struct uart_port *uport) | 441 | static void dz_shutdown(struct uart_port *uport) |
442 | { | 442 | { |
443 | dz_stop_tx(uport, 0); | 443 | dz_stop_tx(uport); |
444 | } | 444 | } |
445 | 445 | ||
446 | /* | 446 | /* |
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c index c112b32764e8..79f8df4d66b7 100644 --- a/drivers/serial/icom.c +++ b/drivers/serial/icom.c | |||
@@ -989,18 +989,16 @@ static unsigned int icom_get_mctrl(struct uart_port *port) | |||
989 | return result; | 989 | return result; |
990 | } | 990 | } |
991 | 991 | ||
992 | static void icom_stop_tx(struct uart_port *port, unsigned int tty_stop) | 992 | static void icom_stop_tx(struct uart_port *port) |
993 | { | 993 | { |
994 | unsigned char cmdReg; | 994 | unsigned char cmdReg; |
995 | 995 | ||
996 | if (tty_stop) { | 996 | trace(ICOM_PORT, "STOP", 0); |
997 | trace(ICOM_PORT, "STOP", 0); | 997 | cmdReg = readb(&ICOM_PORT->dram->CmdReg); |
998 | cmdReg = readb(&ICOM_PORT->dram->CmdReg); | 998 | writeb(cmdReg | CMD_HOLD_XMIT, &ICOM_PORT->dram->CmdReg); |
999 | writeb(cmdReg | CMD_HOLD_XMIT, &ICOM_PORT->dram->CmdReg); | ||
1000 | } | ||
1001 | } | 999 | } |
1002 | 1000 | ||
1003 | static void icom_start_tx(struct uart_port *port, unsigned int tty_start) | 1001 | static void icom_start_tx(struct uart_port *port) |
1004 | { | 1002 | { |
1005 | unsigned char cmdReg; | 1003 | unsigned char cmdReg; |
1006 | 1004 | ||
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 01a8726a3f97..4c985e6b3784 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -124,7 +124,7 @@ static void imx_timeout(unsigned long data) | |||
124 | /* | 124 | /* |
125 | * interrupts disabled on entry | 125 | * interrupts disabled on entry |
126 | */ | 126 | */ |
127 | static void imx_stop_tx(struct uart_port *port, unsigned int tty_stop) | 127 | static void imx_stop_tx(struct uart_port *port) |
128 | { | 128 | { |
129 | struct imx_port *sport = (struct imx_port *)port; | 129 | struct imx_port *sport = (struct imx_port *)port; |
130 | UCR1((u32)sport->port.membase) &= ~UCR1_TXMPTYEN; | 130 | UCR1((u32)sport->port.membase) &= ~UCR1_TXMPTYEN; |
@@ -165,13 +165,13 @@ static inline void imx_transmit_buffer(struct imx_port *sport) | |||
165 | } while (!(UTS((u32)sport->port.membase) & UTS_TXFULL)); | 165 | } while (!(UTS((u32)sport->port.membase) & UTS_TXFULL)); |
166 | 166 | ||
167 | if (uart_circ_empty(xmit)) | 167 | if (uart_circ_empty(xmit)) |
168 | imx_stop_tx(&sport->port, 0); | 168 | imx_stop_tx(&sport->port); |
169 | } | 169 | } |
170 | 170 | ||
171 | /* | 171 | /* |
172 | * interrupts disabled on entry | 172 | * interrupts disabled on entry |
173 | */ | 173 | */ |
174 | static void imx_start_tx(struct uart_port *port, unsigned int tty_start) | 174 | static void imx_start_tx(struct uart_port *port) |
175 | { | 175 | { |
176 | struct imx_port *sport = (struct imx_port *)port; | 176 | struct imx_port *sport = (struct imx_port *)port; |
177 | 177 | ||
@@ -196,7 +196,7 @@ static irqreturn_t imx_txint(int irq, void *dev_id, struct pt_regs *regs) | |||
196 | } | 196 | } |
197 | 197 | ||
198 | if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { | 198 | if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { |
199 | imx_stop_tx(&sport->port, 0); | 199 | imx_stop_tx(&sport->port); |
200 | goto out; | 200 | goto out; |
201 | } | 201 | } |
202 | 202 | ||
@@ -291,13 +291,31 @@ static unsigned int imx_tx_empty(struct uart_port *port) | |||
291 | return USR2((u32)sport->port.membase) & USR2_TXDC ? TIOCSER_TEMT : 0; | 291 | return USR2((u32)sport->port.membase) & USR2_TXDC ? TIOCSER_TEMT : 0; |
292 | } | 292 | } |
293 | 293 | ||
294 | /* | ||
295 | * We have a modem side uart, so the meanings of RTS and CTS are inverted. | ||
296 | */ | ||
294 | static unsigned int imx_get_mctrl(struct uart_port *port) | 297 | static unsigned int imx_get_mctrl(struct uart_port *port) |
295 | { | 298 | { |
296 | return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; | 299 | struct imx_port *sport = (struct imx_port *)port; |
300 | unsigned int tmp = TIOCM_DSR | TIOCM_CAR; | ||
301 | |||
302 | if (USR1((u32)sport->port.membase) & USR1_RTSS) | ||
303 | tmp |= TIOCM_CTS; | ||
304 | |||
305 | if (UCR2((u32)sport->port.membase) & UCR2_CTS) | ||
306 | tmp |= TIOCM_RTS; | ||
307 | |||
308 | return tmp; | ||
297 | } | 309 | } |
298 | 310 | ||
299 | static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl) | 311 | static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl) |
300 | { | 312 | { |
313 | struct imx_port *sport = (struct imx_port *)port; | ||
314 | |||
315 | if (mctrl & TIOCM_RTS) | ||
316 | UCR2((u32)sport->port.membase) |= UCR2_CTS; | ||
317 | else | ||
318 | UCR2((u32)sport->port.membase) &= ~UCR2_CTS; | ||
301 | } | 319 | } |
302 | 320 | ||
303 | /* | 321 | /* |
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c index 793c3a7cbe47..0c5c96a582b3 100644 --- a/drivers/serial/ioc4_serial.c +++ b/drivers/serial/ioc4_serial.c | |||
@@ -2373,10 +2373,9 @@ static unsigned int ic4_tx_empty(struct uart_port *the_port) | |||
2373 | /** | 2373 | /** |
2374 | * ic4_stop_tx - stop the transmitter | 2374 | * ic4_stop_tx - stop the transmitter |
2375 | * @port: Port to operate on | 2375 | * @port: Port to operate on |
2376 | * @tty_stop: Set to 1 if called via uart_stop | ||
2377 | * | 2376 | * |
2378 | */ | 2377 | */ |
2379 | static void ic4_stop_tx(struct uart_port *the_port, unsigned int tty_stop) | 2378 | static void ic4_stop_tx(struct uart_port *the_port) |
2380 | { | 2379 | { |
2381 | } | 2380 | } |
2382 | 2381 | ||
@@ -2471,10 +2470,9 @@ static unsigned int ic4_get_mctrl(struct uart_port *the_port) | |||
2471 | /** | 2470 | /** |
2472 | * ic4_start_tx - Start transmitter, flush any output | 2471 | * ic4_start_tx - Start transmitter, flush any output |
2473 | * @port: Port to operate on | 2472 | * @port: Port to operate on |
2474 | * @tty_stop: Set to 1 if called via uart_start | ||
2475 | * | 2473 | * |
2476 | */ | 2474 | */ |
2477 | static void ic4_start_tx(struct uart_port *the_port, unsigned int tty_stop) | 2475 | static void ic4_start_tx(struct uart_port *the_port) |
2478 | { | 2476 | { |
2479 | struct ioc4_port *port = get_ioc4_port(the_port); | 2477 | struct ioc4_port *port = get_ioc4_port(the_port); |
2480 | unsigned long flags; | 2478 | unsigned long flags; |
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index ea5bf4d4daa3..ef132349f310 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c | |||
@@ -592,7 +592,7 @@ static void ip22zilog_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
592 | } | 592 | } |
593 | 593 | ||
594 | /* The port lock is held and interrupts are disabled. */ | 594 | /* The port lock is held and interrupts are disabled. */ |
595 | static void ip22zilog_stop_tx(struct uart_port *port, unsigned int tty_stop) | 595 | static void ip22zilog_stop_tx(struct uart_port *port) |
596 | { | 596 | { |
597 | struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port; | 597 | struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port; |
598 | 598 | ||
@@ -600,7 +600,7 @@ static void ip22zilog_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
600 | } | 600 | } |
601 | 601 | ||
602 | /* The port lock is held and interrupts are disabled. */ | 602 | /* The port lock is held and interrupts are disabled. */ |
603 | static void ip22zilog_start_tx(struct uart_port *port, unsigned int tty_start) | 603 | static void ip22zilog_start_tx(struct uart_port *port) |
604 | { | 604 | { |
605 | struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port; | 605 | struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port; |
606 | struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port); | 606 | struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port); |
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index 98de2258fd06..6fa0d62d6f68 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c | |||
@@ -113,7 +113,7 @@ static void jsm_tty_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
113 | udelay(10); | 113 | udelay(10); |
114 | } | 114 | } |
115 | 115 | ||
116 | static void jsm_tty_start_tx(struct uart_port *port, unsigned int tty_start) | 116 | static void jsm_tty_start_tx(struct uart_port *port) |
117 | { | 117 | { |
118 | struct jsm_channel *channel = (struct jsm_channel *)port; | 118 | struct jsm_channel *channel = (struct jsm_channel *)port; |
119 | 119 | ||
@@ -125,7 +125,7 @@ static void jsm_tty_start_tx(struct uart_port *port, unsigned int tty_start) | |||
125 | jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "finish\n"); | 125 | jsm_printk(IOCTL, INFO, &channel->ch_bd->pci_dev, "finish\n"); |
126 | } | 126 | } |
127 | 127 | ||
128 | static void jsm_tty_stop_tx(struct uart_port *port, unsigned int tty_stop) | 128 | static void jsm_tty_stop_tx(struct uart_port *port) |
129 | { | 129 | { |
130 | struct jsm_channel *channel = (struct jsm_channel *)port; | 130 | struct jsm_channel *channel = (struct jsm_channel *)port; |
131 | 131 | ||
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c index 9b50560b9d16..b0ecc7537ce5 100644 --- a/drivers/serial/m32r_sio.c +++ b/drivers/serial/m32r_sio.c | |||
@@ -275,7 +275,7 @@ serial_out(struct uart_sio_port *up, int offset, int value) | |||
275 | __sio_out(value, offset); | 275 | __sio_out(value, offset); |
276 | } | 276 | } |
277 | 277 | ||
278 | static void m32r_sio_stop_tx(struct uart_port *port, unsigned int tty_stop) | 278 | static void m32r_sio_stop_tx(struct uart_port *port) |
279 | { | 279 | { |
280 | struct uart_sio_port *up = (struct uart_sio_port *)port; | 280 | struct uart_sio_port *up = (struct uart_sio_port *)port; |
281 | 281 | ||
@@ -285,7 +285,7 @@ static void m32r_sio_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
285 | } | 285 | } |
286 | } | 286 | } |
287 | 287 | ||
288 | static void m32r_sio_start_tx(struct uart_port *port, unsigned int tty_start) | 288 | static void m32r_sio_start_tx(struct uart_port *port) |
289 | { | 289 | { |
290 | #ifdef CONFIG_SERIAL_M32R_PLDSIO | 290 | #ifdef CONFIG_SERIAL_M32R_PLDSIO |
291 | struct uart_sio_port *up = (struct uart_sio_port *)port; | 291 | struct uart_sio_port *up = (struct uart_sio_port *)port; |
@@ -425,7 +425,7 @@ static _INLINE_ void transmit_chars(struct uart_sio_port *up) | |||
425 | return; | 425 | return; |
426 | } | 426 | } |
427 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 427 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { |
428 | m32r_sio_stop_tx(&up->port, 0); | 428 | m32r_sio_stop_tx(&up->port); |
429 | return; | 429 | return; |
430 | } | 430 | } |
431 | 431 | ||
@@ -446,7 +446,7 @@ static _INLINE_ void transmit_chars(struct uart_sio_port *up) | |||
446 | DEBUG_INTR("THRE..."); | 446 | DEBUG_INTR("THRE..."); |
447 | 447 | ||
448 | if (uart_circ_empty(xmit)) | 448 | if (uart_circ_empty(xmit)) |
449 | m32r_sio_stop_tx(&up->port, 0); | 449 | m32r_sio_stop_tx(&up->port); |
450 | } | 450 | } |
451 | 451 | ||
452 | /* | 452 | /* |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 2a5cf174ca30..a3cd0ee8486d 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -119,7 +119,7 @@ mpc52xx_uart_get_mctrl(struct uart_port *port) | |||
119 | } | 119 | } |
120 | 120 | ||
121 | static void | 121 | static void |
122 | mpc52xx_uart_stop_tx(struct uart_port *port, unsigned int tty_stop) | 122 | mpc52xx_uart_stop_tx(struct uart_port *port) |
123 | { | 123 | { |
124 | /* port->lock taken by caller */ | 124 | /* port->lock taken by caller */ |
125 | port->read_status_mask &= ~MPC52xx_PSC_IMR_TXRDY; | 125 | port->read_status_mask &= ~MPC52xx_PSC_IMR_TXRDY; |
@@ -127,7 +127,7 @@ mpc52xx_uart_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | static void | 129 | static void |
130 | mpc52xx_uart_start_tx(struct uart_port *port, unsigned int tty_start) | 130 | mpc52xx_uart_start_tx(struct uart_port *port) |
131 | { | 131 | { |
132 | /* port->lock taken by caller */ | 132 | /* port->lock taken by caller */ |
133 | port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY; | 133 | port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY; |
@@ -485,7 +485,7 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port) | |||
485 | 485 | ||
486 | /* Nothing to do ? */ | 486 | /* Nothing to do ? */ |
487 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 487 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
488 | mpc52xx_uart_stop_tx(port,0); | 488 | mpc52xx_uart_stop_tx(port); |
489 | return 0; | 489 | return 0; |
490 | } | 490 | } |
491 | 491 | ||
@@ -504,7 +504,7 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port) | |||
504 | 504 | ||
505 | /* Maybe we're done after all */ | 505 | /* Maybe we're done after all */ |
506 | if (uart_circ_empty(xmit)) { | 506 | if (uart_circ_empty(xmit)) { |
507 | mpc52xx_uart_stop_tx(port,0); | 507 | mpc52xx_uart_stop_tx(port); |
508 | return 0; | 508 | return 0; |
509 | } | 509 | } |
510 | 510 | ||
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index e43276c6a954..efe79b1fd431 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c | |||
@@ -1072,18 +1072,18 @@ mpsc_get_mctrl(struct uart_port *port) | |||
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | static void | 1074 | static void |
1075 | mpsc_stop_tx(struct uart_port *port, uint tty_start) | 1075 | mpsc_stop_tx(struct uart_port *port) |
1076 | { | 1076 | { |
1077 | struct mpsc_port_info *pi = (struct mpsc_port_info *)port; | 1077 | struct mpsc_port_info *pi = (struct mpsc_port_info *)port; |
1078 | 1078 | ||
1079 | pr_debug("mpsc_stop_tx[%d]: tty_start: %d\n", port->line, tty_start); | 1079 | pr_debug("mpsc_stop_tx[%d]\n", port->line); |
1080 | 1080 | ||
1081 | mpsc_freeze(pi); | 1081 | mpsc_freeze(pi); |
1082 | return; | 1082 | return; |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | static void | 1085 | static void |
1086 | mpsc_start_tx(struct uart_port *port, uint tty_start) | 1086 | mpsc_start_tx(struct uart_port *port) |
1087 | { | 1087 | { |
1088 | struct mpsc_port_info *pi = (struct mpsc_port_info *)port; | 1088 | struct mpsc_port_info *pi = (struct mpsc_port_info *)port; |
1089 | 1089 | ||
@@ -1091,7 +1091,7 @@ mpsc_start_tx(struct uart_port *port, uint tty_start) | |||
1091 | mpsc_copy_tx_data(pi); | 1091 | mpsc_copy_tx_data(pi); |
1092 | mpsc_sdma_start_tx(pi); | 1092 | mpsc_sdma_start_tx(pi); |
1093 | 1093 | ||
1094 | pr_debug("mpsc_start_tx[%d]: tty_start: %d\n", port->line, tty_start); | 1094 | pr_debug("mpsc_start_tx[%d]\n", port->line); |
1095 | return; | 1095 | return; |
1096 | } | 1096 | } |
1097 | 1097 | ||
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index dadd7e19714e..189064607709 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c | |||
@@ -111,22 +111,20 @@ static unsigned int mux_get_mctrl(struct uart_port *port) | |||
111 | /** | 111 | /** |
112 | * mux_stop_tx - Stop transmitting characters. | 112 | * mux_stop_tx - Stop transmitting characters. |
113 | * @port: Ptr to the uart_port. | 113 | * @port: Ptr to the uart_port. |
114 | * @tty_stop: tty layer issue this command? | ||
115 | * | 114 | * |
116 | * The Serial MUX does not support this function. | 115 | * The Serial MUX does not support this function. |
117 | */ | 116 | */ |
118 | static void mux_stop_tx(struct uart_port *port, unsigned int tty_stop) | 117 | static void mux_stop_tx(struct uart_port *port) |
119 | { | 118 | { |
120 | } | 119 | } |
121 | 120 | ||
122 | /** | 121 | /** |
123 | * mux_start_tx - Start transmitting characters. | 122 | * mux_start_tx - Start transmitting characters. |
124 | * @port: Ptr to the uart_port. | 123 | * @port: Ptr to the uart_port. |
125 | * @tty_start: tty layer issue this command? | ||
126 | * | 124 | * |
127 | * The Serial Mux does not support this function. | 125 | * The Serial Mux does not support this function. |
128 | */ | 126 | */ |
129 | static void mux_start_tx(struct uart_port *port, unsigned int tty_start) | 127 | static void mux_start_tx(struct uart_port *port) |
130 | { | 128 | { |
131 | } | 129 | } |
132 | 130 | ||
@@ -181,7 +179,7 @@ static void mux_write(struct uart_port *port) | |||
181 | } | 179 | } |
182 | 180 | ||
183 | if(uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 181 | if(uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
184 | mux_stop_tx(port, 0); | 182 | mux_stop_tx(port); |
185 | return; | 183 | return; |
186 | } | 184 | } |
187 | 185 | ||
@@ -202,7 +200,7 @@ static void mux_write(struct uart_port *port) | |||
202 | uart_write_wakeup(port); | 200 | uart_write_wakeup(port); |
203 | 201 | ||
204 | if (uart_circ_empty(xmit)) | 202 | if (uart_circ_empty(xmit)) |
205 | mux_stop_tx(port, 0); | 203 | mux_stop_tx(port); |
206 | } | 204 | } |
207 | 205 | ||
208 | /** | 206 | /** |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 7db2f37532cf..5bfde99e245e 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -630,11 +630,10 @@ static unsigned int pmz_get_mctrl(struct uart_port *port) | |||
630 | 630 | ||
631 | /* | 631 | /* |
632 | * Stop TX side. Dealt like sunzilog at next Tx interrupt, | 632 | * Stop TX side. Dealt like sunzilog at next Tx interrupt, |
633 | * though for DMA, we will have to do a bit more. What is | 633 | * though for DMA, we will have to do a bit more. |
634 | * the meaning of the tty_stop bit ? XXX | ||
635 | * The port lock is held and interrupts are disabled. | 634 | * The port lock is held and interrupts are disabled. |
636 | */ | 635 | */ |
637 | static void pmz_stop_tx(struct uart_port *port, unsigned int tty_stop) | 636 | static void pmz_stop_tx(struct uart_port *port) |
638 | { | 637 | { |
639 | to_pmz(port)->flags |= PMACZILOG_FLAG_TX_STOPPED; | 638 | to_pmz(port)->flags |= PMACZILOG_FLAG_TX_STOPPED; |
640 | } | 639 | } |
@@ -643,7 +642,7 @@ static void pmz_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
643 | * Kick the Tx side. | 642 | * Kick the Tx side. |
644 | * The port lock is held and interrupts are disabled. | 643 | * The port lock is held and interrupts are disabled. |
645 | */ | 644 | */ |
646 | static void pmz_start_tx(struct uart_port *port, unsigned int tty_start) | 645 | static void pmz_start_tx(struct uart_port *port) |
647 | { | 646 | { |
648 | struct uart_pmac_port *uap = to_pmz(port); | 647 | struct uart_pmac_port *uap = to_pmz(port); |
649 | unsigned char status; | 648 | unsigned char status; |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 461c81c93207..eaa0af835290 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -80,7 +80,7 @@ static void serial_pxa_enable_ms(struct uart_port *port) | |||
80 | serial_out(up, UART_IER, up->ier); | 80 | serial_out(up, UART_IER, up->ier); |
81 | } | 81 | } |
82 | 82 | ||
83 | static void serial_pxa_stop_tx(struct uart_port *port, unsigned int tty_stop) | 83 | static void serial_pxa_stop_tx(struct uart_port *port) |
84 | { | 84 | { |
85 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; | 85 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; |
86 | 86 | ||
@@ -185,7 +185,7 @@ static void transmit_chars(struct uart_pxa_port *up) | |||
185 | return; | 185 | return; |
186 | } | 186 | } |
187 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 187 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { |
188 | serial_pxa_stop_tx(&up->port, 0); | 188 | serial_pxa_stop_tx(&up->port); |
189 | return; | 189 | return; |
190 | } | 190 | } |
191 | 191 | ||
@@ -203,10 +203,10 @@ static void transmit_chars(struct uart_pxa_port *up) | |||
203 | 203 | ||
204 | 204 | ||
205 | if (uart_circ_empty(xmit)) | 205 | if (uart_circ_empty(xmit)) |
206 | serial_pxa_stop_tx(&up->port, 0); | 206 | serial_pxa_stop_tx(&up->port); |
207 | } | 207 | } |
208 | 208 | ||
209 | static void serial_pxa_start_tx(struct uart_port *port, unsigned int tty_start) | 209 | static void serial_pxa_start_tx(struct uart_port *port) |
210 | { | 210 | { |
211 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; | 211 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; |
212 | 212 | ||
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c index 7365d4b50b95..c361c6fb0809 100644 --- a/drivers/serial/s3c2410.c +++ b/drivers/serial/s3c2410.c | |||
@@ -246,8 +246,7 @@ static void s3c24xx_serial_rx_disable(struct uart_port *port) | |||
246 | spin_unlock_irqrestore(&port->lock, flags); | 246 | spin_unlock_irqrestore(&port->lock, flags); |
247 | } | 247 | } |
248 | 248 | ||
249 | static void | 249 | static void s3c24xx_serial_stop_tx(struct uart_port *port) |
250 | s3c24xx_serial_stop_tx(struct uart_port *port, unsigned int tty_stop) | ||
251 | { | 250 | { |
252 | if (tx_enabled(port)) { | 251 | if (tx_enabled(port)) { |
253 | disable_irq(TX_IRQ(port)); | 252 | disable_irq(TX_IRQ(port)); |
@@ -257,8 +256,7 @@ s3c24xx_serial_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
257 | } | 256 | } |
258 | } | 257 | } |
259 | 258 | ||
260 | static void | 259 | static void s3c24xx_serial_start_tx(struct uart_port *port) |
261 | s3c24xx_serial_start_tx(struct uart_port *port, unsigned int tty_start) | ||
262 | { | 260 | { |
263 | if (!tx_enabled(port)) { | 261 | if (!tx_enabled(port)) { |
264 | if (port->flags & UPF_CONS_FLOW) | 262 | if (port->flags & UPF_CONS_FLOW) |
@@ -424,7 +422,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *re | |||
424 | */ | 422 | */ |
425 | 423 | ||
426 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 424 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
427 | s3c24xx_serial_stop_tx(port, 0); | 425 | s3c24xx_serial_stop_tx(port); |
428 | goto out; | 426 | goto out; |
429 | } | 427 | } |
430 | 428 | ||
@@ -443,7 +441,7 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id, struct pt_regs *re | |||
443 | uart_write_wakeup(port); | 441 | uart_write_wakeup(port); |
444 | 442 | ||
445 | if (uart_circ_empty(xmit)) | 443 | if (uart_circ_empty(xmit)) |
446 | s3c24xx_serial_stop_tx(port, 0); | 444 | s3c24xx_serial_stop_tx(port); |
447 | 445 | ||
448 | out: | 446 | out: |
449 | return IRQ_HANDLED; | 447 | return IRQ_HANDLED; |
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c index 98641c3f5ab9..1225b14f6e9d 100644 --- a/drivers/serial/sa1100.c +++ b/drivers/serial/sa1100.c | |||
@@ -145,7 +145,7 @@ static void sa1100_timeout(unsigned long data) | |||
145 | /* | 145 | /* |
146 | * interrupts disabled on entry | 146 | * interrupts disabled on entry |
147 | */ | 147 | */ |
148 | static void sa1100_stop_tx(struct uart_port *port, unsigned int tty_stop) | 148 | static void sa1100_stop_tx(struct uart_port *port) |
149 | { | 149 | { |
150 | struct sa1100_port *sport = (struct sa1100_port *)port; | 150 | struct sa1100_port *sport = (struct sa1100_port *)port; |
151 | u32 utcr3; | 151 | u32 utcr3; |
@@ -158,7 +158,7 @@ static void sa1100_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
158 | /* | 158 | /* |
159 | * interrupts may not be disabled on entry | 159 | * interrupts may not be disabled on entry |
160 | */ | 160 | */ |
161 | static void sa1100_start_tx(struct uart_port *port, unsigned int tty_start) | 161 | static void sa1100_start_tx(struct uart_port *port) |
162 | { | 162 | { |
163 | struct sa1100_port *sport = (struct sa1100_port *)port; | 163 | struct sa1100_port *sport = (struct sa1100_port *)port; |
164 | unsigned long flags; | 164 | unsigned long flags; |
@@ -264,7 +264,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport) | |||
264 | sa1100_mctrl_check(sport); | 264 | sa1100_mctrl_check(sport); |
265 | 265 | ||
266 | if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { | 266 | if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { |
267 | sa1100_stop_tx(&sport->port, 0); | 267 | sa1100_stop_tx(&sport->port); |
268 | return; | 268 | return; |
269 | } | 269 | } |
270 | 270 | ||
@@ -284,7 +284,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport) | |||
284 | uart_write_wakeup(&sport->port); | 284 | uart_write_wakeup(&sport->port); |
285 | 285 | ||
286 | if (uart_circ_empty(xmit)) | 286 | if (uart_circ_empty(xmit)) |
287 | sa1100_stop_tx(&sport->port, 0); | 287 | sa1100_stop_tx(&sport->port); |
288 | } | 288 | } |
289 | 289 | ||
290 | static irqreturn_t sa1100_int(int irq, void *dev_id, struct pt_regs *regs) | 290 | static irqreturn_t sa1100_int(int irq, void *dev_id, struct pt_regs *regs) |
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 54699c3a00ab..dea156a62d0a 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -80,7 +80,7 @@ static void uart_stop(struct tty_struct *tty) | |||
80 | unsigned long flags; | 80 | unsigned long flags; |
81 | 81 | ||
82 | spin_lock_irqsave(&port->lock, flags); | 82 | spin_lock_irqsave(&port->lock, flags); |
83 | port->ops->stop_tx(port, 1); | 83 | port->ops->stop_tx(port); |
84 | spin_unlock_irqrestore(&port->lock, flags); | 84 | spin_unlock_irqrestore(&port->lock, flags); |
85 | } | 85 | } |
86 | 86 | ||
@@ -91,7 +91,7 @@ static void __uart_start(struct tty_struct *tty) | |||
91 | 91 | ||
92 | if (!uart_circ_empty(&state->info->xmit) && state->info->xmit.buf && | 92 | if (!uart_circ_empty(&state->info->xmit) && state->info->xmit.buf && |
93 | !tty->stopped && !tty->hw_stopped) | 93 | !tty->stopped && !tty->hw_stopped) |
94 | port->ops->start_tx(port, 1); | 94 | port->ops->start_tx(port); |
95 | } | 95 | } |
96 | 96 | ||
97 | static void uart_start(struct tty_struct *tty) | 97 | static void uart_start(struct tty_struct *tty) |
@@ -542,7 +542,7 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) | |||
542 | port->x_char = ch; | 542 | port->x_char = ch; |
543 | if (ch) { | 543 | if (ch) { |
544 | spin_lock_irqsave(&port->lock, flags); | 544 | spin_lock_irqsave(&port->lock, flags); |
545 | port->ops->start_tx(port, 0); | 545 | port->ops->start_tx(port); |
546 | spin_unlock_irqrestore(&port->lock, flags); | 546 | spin_unlock_irqrestore(&port->lock, flags); |
547 | } | 547 | } |
548 | } | 548 | } |
@@ -1146,7 +1146,7 @@ static void uart_set_termios(struct tty_struct *tty, struct termios *old_termios | |||
1146 | spin_lock_irqsave(&state->port->lock, flags); | 1146 | spin_lock_irqsave(&state->port->lock, flags); |
1147 | if (!(state->port->ops->get_mctrl(state->port) & TIOCM_CTS)) { | 1147 | if (!(state->port->ops->get_mctrl(state->port) & TIOCM_CTS)) { |
1148 | tty->hw_stopped = 1; | 1148 | tty->hw_stopped = 1; |
1149 | state->port->ops->stop_tx(state->port, 0); | 1149 | state->port->ops->stop_tx(state->port); |
1150 | } | 1150 | } |
1151 | spin_unlock_irqrestore(&state->port->lock, flags); | 1151 | spin_unlock_irqrestore(&state->port->lock, flags); |
1152 | } | 1152 | } |
@@ -1869,7 +1869,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) | |||
1869 | struct uart_ops *ops = port->ops; | 1869 | struct uart_ops *ops = port->ops; |
1870 | 1870 | ||
1871 | spin_lock_irq(&port->lock); | 1871 | spin_lock_irq(&port->lock); |
1872 | ops->stop_tx(port, 0); | 1872 | ops->stop_tx(port); |
1873 | ops->set_mctrl(port, 0); | 1873 | ops->set_mctrl(port, 0); |
1874 | ops->stop_rx(port); | 1874 | ops->stop_rx(port); |
1875 | spin_unlock_irq(&port->lock); | 1875 | spin_unlock_irq(&port->lock); |
@@ -1935,7 +1935,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | |||
1935 | uart_change_speed(state, NULL); | 1935 | uart_change_speed(state, NULL); |
1936 | spin_lock_irq(&port->lock); | 1936 | spin_lock_irq(&port->lock); |
1937 | ops->set_mctrl(port, port->mctrl); | 1937 | ops->set_mctrl(port, port->mctrl); |
1938 | ops->start_tx(port, 0); | 1938 | ops->start_tx(port); |
1939 | spin_unlock_irq(&port->lock); | 1939 | spin_unlock_irq(&port->lock); |
1940 | } | 1940 | } |
1941 | 1941 | ||
@@ -2289,143 +2289,11 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2) | |||
2289 | } | 2289 | } |
2290 | EXPORT_SYMBOL(uart_match_port); | 2290 | EXPORT_SYMBOL(uart_match_port); |
2291 | 2291 | ||
2292 | /* | ||
2293 | * Try to find an unused uart_state slot for a port. | ||
2294 | */ | ||
2295 | static struct uart_state * | ||
2296 | uart_find_match_or_unused(struct uart_driver *drv, struct uart_port *port) | ||
2297 | { | ||
2298 | int i; | ||
2299 | |||
2300 | /* | ||
2301 | * First, find a port entry which matches. Note: if we do | ||
2302 | * find a matching entry, and it has a non-zero use count, | ||
2303 | * then we can't register the port. | ||
2304 | */ | ||
2305 | for (i = 0; i < drv->nr; i++) | ||
2306 | if (uart_match_port(drv->state[i].port, port)) | ||
2307 | return &drv->state[i]; | ||
2308 | |||
2309 | /* | ||
2310 | * We didn't find a matching entry, so look for the first | ||
2311 | * free entry. We look for one which hasn't been previously | ||
2312 | * used (indicated by zero iobase). | ||
2313 | */ | ||
2314 | for (i = 0; i < drv->nr; i++) | ||
2315 | if (drv->state[i].port->type == PORT_UNKNOWN && | ||
2316 | drv->state[i].port->iobase == 0 && | ||
2317 | drv->state[i].count == 0) | ||
2318 | return &drv->state[i]; | ||
2319 | |||
2320 | /* | ||
2321 | * That also failed. Last resort is to find any currently | ||
2322 | * entry which doesn't have a real port associated with it. | ||
2323 | */ | ||
2324 | for (i = 0; i < drv->nr; i++) | ||
2325 | if (drv->state[i].port->type == PORT_UNKNOWN && | ||
2326 | drv->state[i].count == 0) | ||
2327 | return &drv->state[i]; | ||
2328 | |||
2329 | return NULL; | ||
2330 | } | ||
2331 | |||
2332 | /** | ||
2333 | * uart_register_port: register uart settings with a port | ||
2334 | * @drv: pointer to the uart low level driver structure for this port | ||
2335 | * @port: uart port structure describing the port | ||
2336 | * | ||
2337 | * Register UART settings with the specified low level driver. Detect | ||
2338 | * the type of the port if UPF_BOOT_AUTOCONF is set, and detect the | ||
2339 | * IRQ if UPF_AUTO_IRQ is set. | ||
2340 | * | ||
2341 | * We try to pick the same port for the same IO base address, so that | ||
2342 | * when a modem is plugged in, unplugged and plugged back in, it gets | ||
2343 | * allocated the same port. | ||
2344 | * | ||
2345 | * Returns negative error, or positive line number. | ||
2346 | */ | ||
2347 | int uart_register_port(struct uart_driver *drv, struct uart_port *port) | ||
2348 | { | ||
2349 | struct uart_state *state; | ||
2350 | int ret; | ||
2351 | |||
2352 | down(&port_sem); | ||
2353 | |||
2354 | state = uart_find_match_or_unused(drv, port); | ||
2355 | |||
2356 | if (state) { | ||
2357 | /* | ||
2358 | * Ok, we've found a line that we can use. | ||
2359 | * | ||
2360 | * If we find a port that matches this one, and it appears | ||
2361 | * to be in-use (even if it doesn't have a type) we shouldn't | ||
2362 | * alter it underneath itself - the port may be open and | ||
2363 | * trying to do useful work. | ||
2364 | */ | ||
2365 | if (uart_users(state) != 0) { | ||
2366 | ret = -EBUSY; | ||
2367 | goto out; | ||
2368 | } | ||
2369 | |||
2370 | /* | ||
2371 | * If the port is already initialised, don't touch it. | ||
2372 | */ | ||
2373 | if (state->port->type == PORT_UNKNOWN) { | ||
2374 | state->port->iobase = port->iobase; | ||
2375 | state->port->membase = port->membase; | ||
2376 | state->port->irq = port->irq; | ||
2377 | state->port->uartclk = port->uartclk; | ||
2378 | state->port->fifosize = port->fifosize; | ||
2379 | state->port->regshift = port->regshift; | ||
2380 | state->port->iotype = port->iotype; | ||
2381 | state->port->flags = port->flags; | ||
2382 | state->port->line = state - drv->state; | ||
2383 | state->port->mapbase = port->mapbase; | ||
2384 | |||
2385 | uart_configure_port(drv, state, state->port); | ||
2386 | } | ||
2387 | |||
2388 | ret = state->port->line; | ||
2389 | } else | ||
2390 | ret = -ENOSPC; | ||
2391 | out: | ||
2392 | up(&port_sem); | ||
2393 | return ret; | ||
2394 | } | ||
2395 | |||
2396 | /** | ||
2397 | * uart_unregister_port - de-allocate a port | ||
2398 | * @drv: pointer to the uart low level driver structure for this port | ||
2399 | * @line: line index previously returned from uart_register_port() | ||
2400 | * | ||
2401 | * Hang up the specified line associated with the low level driver, | ||
2402 | * and mark the port as unused. | ||
2403 | */ | ||
2404 | void uart_unregister_port(struct uart_driver *drv, int line) | ||
2405 | { | ||
2406 | struct uart_state *state; | ||
2407 | |||
2408 | if (line < 0 || line >= drv->nr) { | ||
2409 | printk(KERN_ERR "Attempt to unregister "); | ||
2410 | printk("%s%d", drv->dev_name, line); | ||
2411 | printk("\n"); | ||
2412 | return; | ||
2413 | } | ||
2414 | |||
2415 | state = drv->state + line; | ||
2416 | |||
2417 | down(&port_sem); | ||
2418 | uart_unconfigure_port(drv, state); | ||
2419 | up(&port_sem); | ||
2420 | } | ||
2421 | |||
2422 | EXPORT_SYMBOL(uart_write_wakeup); | 2292 | EXPORT_SYMBOL(uart_write_wakeup); |
2423 | EXPORT_SYMBOL(uart_register_driver); | 2293 | EXPORT_SYMBOL(uart_register_driver); |
2424 | EXPORT_SYMBOL(uart_unregister_driver); | 2294 | EXPORT_SYMBOL(uart_unregister_driver); |
2425 | EXPORT_SYMBOL(uart_suspend_port); | 2295 | EXPORT_SYMBOL(uart_suspend_port); |
2426 | EXPORT_SYMBOL(uart_resume_port); | 2296 | EXPORT_SYMBOL(uart_resume_port); |
2427 | EXPORT_SYMBOL(uart_register_port); | ||
2428 | EXPORT_SYMBOL(uart_unregister_port); | ||
2429 | EXPORT_SYMBOL(uart_add_one_port); | 2297 | EXPORT_SYMBOL(uart_add_one_port); |
2430 | EXPORT_SYMBOL(uart_remove_one_port); | 2298 | EXPORT_SYMBOL(uart_remove_one_port); |
2431 | 2299 | ||
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index 56f269b6bfb1..32f808d157a1 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c | |||
@@ -112,13 +112,12 @@ struct uart_port_lh7a40x { | |||
112 | unsigned int statusPrev; /* Most recently read modem status */ | 112 | unsigned int statusPrev; /* Most recently read modem status */ |
113 | }; | 113 | }; |
114 | 114 | ||
115 | static void lh7a40xuart_stop_tx (struct uart_port* port, unsigned int tty_stop) | 115 | static void lh7a40xuart_stop_tx (struct uart_port* port) |
116 | { | 116 | { |
117 | BIT_CLR (port, UART_R_INTEN, TxInt); | 117 | BIT_CLR (port, UART_R_INTEN, TxInt); |
118 | } | 118 | } |
119 | 119 | ||
120 | static void lh7a40xuart_start_tx (struct uart_port* port, | 120 | static void lh7a40xuart_start_tx (struct uart_port* port) |
121 | unsigned int tty_start) | ||
122 | { | 121 | { |
123 | BIT_SET (port, UART_R_INTEN, TxInt); | 122 | BIT_SET (port, UART_R_INTEN, TxInt); |
124 | 123 | ||
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c index d085030df70b..49afadbe461b 100644 --- a/drivers/serial/serial_txx9.c +++ b/drivers/serial/serial_txx9.c | |||
@@ -253,7 +253,7 @@ sio_quot_set(struct uart_txx9_port *up, int quot) | |||
253 | sio_out(up, TXX9_SIBGR, 0xff | TXX9_SIBGR_BCLK_T6); | 253 | sio_out(up, TXX9_SIBGR, 0xff | TXX9_SIBGR_BCLK_T6); |
254 | } | 254 | } |
255 | 255 | ||
256 | static void serial_txx9_stop_tx(struct uart_port *port, unsigned int tty_stop) | 256 | static void serial_txx9_stop_tx(struct uart_port *port) |
257 | { | 257 | { |
258 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; | 258 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; |
259 | unsigned long flags; | 259 | unsigned long flags; |
@@ -263,7 +263,7 @@ static void serial_txx9_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
263 | spin_unlock_irqrestore(&up->port.lock, flags); | 263 | spin_unlock_irqrestore(&up->port.lock, flags); |
264 | } | 264 | } |
265 | 265 | ||
266 | static void serial_txx9_start_tx(struct uart_port *port, unsigned int tty_start) | 266 | static void serial_txx9_start_tx(struct uart_port *port) |
267 | { | 267 | { |
268 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; | 268 | struct uart_txx9_port *up = (struct uart_txx9_port *)port; |
269 | unsigned long flags; | 269 | unsigned long flags; |
@@ -372,7 +372,7 @@ static inline void transmit_chars(struct uart_txx9_port *up) | |||
372 | return; | 372 | return; |
373 | } | 373 | } |
374 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 374 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { |
375 | serial_txx9_stop_tx(&up->port, 0); | 375 | serial_txx9_stop_tx(&up->port); |
376 | return; | 376 | return; |
377 | } | 377 | } |
378 | 378 | ||
@@ -389,7 +389,7 @@ static inline void transmit_chars(struct uart_txx9_port *up) | |||
389 | uart_write_wakeup(&up->port); | 389 | uart_write_wakeup(&up->port); |
390 | 390 | ||
391 | if (uart_circ_empty(xmit)) | 391 | if (uart_circ_empty(xmit)) |
392 | serial_txx9_stop_tx(&up->port, 0); | 392 | serial_txx9_stop_tx(&up->port); |
393 | } | 393 | } |
394 | 394 | ||
395 | static irqreturn_t serial_txx9_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 395 | static irqreturn_t serial_txx9_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index ad5b776d779b..512266307866 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -79,8 +79,8 @@ static struct sci_port *serial_console_port = 0; | |||
79 | #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ | 79 | #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ |
80 | 80 | ||
81 | /* Function prototypes */ | 81 | /* Function prototypes */ |
82 | static void sci_stop_tx(struct uart_port *port, unsigned int tty_stop); | 82 | static void sci_stop_tx(struct uart_port *port); |
83 | static void sci_start_tx(struct uart_port *port, unsigned int tty_start); | 83 | static void sci_start_tx(struct uart_port *port); |
84 | static void sci_start_rx(struct uart_port *port, unsigned int tty_start); | 84 | static void sci_start_rx(struct uart_port *port, unsigned int tty_start); |
85 | static void sci_stop_rx(struct uart_port *port); | 85 | static void sci_stop_rx(struct uart_port *port); |
86 | static int sci_request_irq(struct sci_port *port); | 86 | static int sci_request_irq(struct sci_port *port); |
@@ -455,7 +455,7 @@ static void sci_transmit_chars(struct uart_port *port) | |||
455 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) | 455 | if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) |
456 | uart_write_wakeup(port); | 456 | uart_write_wakeup(port); |
457 | if (uart_circ_empty(xmit)) { | 457 | if (uart_circ_empty(xmit)) { |
458 | sci_stop_tx(port, 0); | 458 | sci_stop_tx(port); |
459 | } else { | 459 | } else { |
460 | local_irq_save(flags); | 460 | local_irq_save(flags); |
461 | ctrl = sci_in(port, SCSCR); | 461 | ctrl = sci_in(port, SCSCR); |
@@ -900,7 +900,7 @@ static unsigned int sci_get_mctrl(struct uart_port *port) | |||
900 | return TIOCM_DTR | TIOCM_RTS | TIOCM_DSR; | 900 | return TIOCM_DTR | TIOCM_RTS | TIOCM_DSR; |
901 | } | 901 | } |
902 | 902 | ||
903 | static void sci_start_tx(struct uart_port *port, unsigned int tty_start) | 903 | static void sci_start_tx(struct uart_port *port) |
904 | { | 904 | { |
905 | struct sci_port *s = &sci_ports[port->line]; | 905 | struct sci_port *s = &sci_ports[port->line]; |
906 | 906 | ||
@@ -909,7 +909,7 @@ static void sci_start_tx(struct uart_port *port, unsigned int tty_start) | |||
909 | enable_irq(s->irqs[SCIx_TXI_IRQ]); | 909 | enable_irq(s->irqs[SCIx_TXI_IRQ]); |
910 | } | 910 | } |
911 | 911 | ||
912 | static void sci_stop_tx(struct uart_port *port, unsigned int tty_stop) | 912 | static void sci_stop_tx(struct uart_port *port) |
913 | { | 913 | { |
914 | unsigned long flags; | 914 | unsigned long flags; |
915 | unsigned short ctrl; | 915 | unsigned short ctrl; |
@@ -978,7 +978,7 @@ static void sci_shutdown(struct uart_port *port) | |||
978 | struct sci_port *s = &sci_ports[port->line]; | 978 | struct sci_port *s = &sci_ports[port->line]; |
979 | 979 | ||
980 | sci_stop_rx(port); | 980 | sci_stop_rx(port); |
981 | sci_stop_tx(port, 1); | 981 | sci_stop_tx(port); |
982 | sci_free_irq(s); | 982 | sci_free_irq(s); |
983 | 983 | ||
984 | #if defined(__H8300S__) | 984 | #if defined(__H8300S__) |
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c index 12d1f14e78ce..313f9df24a2d 100644 --- a/drivers/serial/sn_console.c +++ b/drivers/serial/sn_console.c | |||
@@ -259,10 +259,9 @@ static unsigned int snp_tx_empty(struct uart_port *port) | |||
259 | /** | 259 | /** |
260 | * snp_stop_tx - stop the transmitter - no-op for us | 260 | * snp_stop_tx - stop the transmitter - no-op for us |
261 | * @port: Port to operat eon - we ignore - no-op function | 261 | * @port: Port to operat eon - we ignore - no-op function |
262 | * @tty_stop: Set to 1 if called via uart_stop | ||
263 | * | 262 | * |
264 | */ | 263 | */ |
265 | static void snp_stop_tx(struct uart_port *port, unsigned int tty_stop) | 264 | static void snp_stop_tx(struct uart_port *port) |
266 | { | 265 | { |
267 | } | 266 | } |
268 | 267 | ||
@@ -325,10 +324,9 @@ static void snp_stop_rx(struct uart_port *port) | |||
325 | /** | 324 | /** |
326 | * snp_start_tx - Start transmitter | 325 | * snp_start_tx - Start transmitter |
327 | * @port: Port to operate on | 326 | * @port: Port to operate on |
328 | * @tty_stop: Set to 1 if called via uart_start | ||
329 | * | 327 | * |
330 | */ | 328 | */ |
331 | static void snp_start_tx(struct uart_port *port, unsigned int tty_stop) | 329 | static void snp_start_tx(struct uart_port *port) |
332 | { | 330 | { |
333 | if (sal_console_port.sc_ops->sal_wakeup_transmit) | 331 | if (sal_console_port.sc_ops->sal_wakeup_transmit) |
334 | sal_console_port.sc_ops->sal_wakeup_transmit(&sal_console_port, | 332 | sal_console_port.sc_ops->sal_wakeup_transmit(&sal_console_port, |
@@ -615,7 +613,7 @@ static void sn_transmit_chars(struct sn_cons_port *port, int raw) | |||
615 | uart_write_wakeup(&port->sc_port); | 613 | uart_write_wakeup(&port->sc_port); |
616 | 614 | ||
617 | if (uart_circ_empty(xmit)) | 615 | if (uart_circ_empty(xmit)) |
618 | snp_stop_tx(&port->sc_port, 0); /* no-op for us */ | 616 | snp_stop_tx(&port->sc_port); /* no-op for us */ |
619 | } | 617 | } |
620 | 618 | ||
621 | /** | 619 | /** |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 8d198880756a..e971156daa60 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -245,7 +245,7 @@ receive_chars(struct uart_sunsab_port *up, | |||
245 | return tty; | 245 | return tty; |
246 | } | 246 | } |
247 | 247 | ||
248 | static void sunsab_stop_tx(struct uart_port *, unsigned int); | 248 | static void sunsab_stop_tx(struct uart_port *); |
249 | static void sunsab_tx_idle(struct uart_sunsab_port *); | 249 | static void sunsab_tx_idle(struct uart_sunsab_port *); |
250 | 250 | ||
251 | static void transmit_chars(struct uart_sunsab_port *up, | 251 | static void transmit_chars(struct uart_sunsab_port *up, |
@@ -301,7 +301,7 @@ static void transmit_chars(struct uart_sunsab_port *up, | |||
301 | uart_write_wakeup(&up->port); | 301 | uart_write_wakeup(&up->port); |
302 | 302 | ||
303 | if (uart_circ_empty(xmit)) | 303 | if (uart_circ_empty(xmit)) |
304 | sunsab_stop_tx(&up->port, 0); | 304 | sunsab_stop_tx(&up->port); |
305 | } | 305 | } |
306 | 306 | ||
307 | static void check_status(struct uart_sunsab_port *up, | 307 | static void check_status(struct uart_sunsab_port *up, |
@@ -448,7 +448,7 @@ static unsigned int sunsab_get_mctrl(struct uart_port *port) | |||
448 | } | 448 | } |
449 | 449 | ||
450 | /* port->lock held by caller. */ | 450 | /* port->lock held by caller. */ |
451 | static void sunsab_stop_tx(struct uart_port *port, unsigned int tty_stop) | 451 | static void sunsab_stop_tx(struct uart_port *port) |
452 | { | 452 | { |
453 | struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; | 453 | struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; |
454 | 454 | ||
@@ -476,7 +476,7 @@ static void sunsab_tx_idle(struct uart_sunsab_port *up) | |||
476 | } | 476 | } |
477 | 477 | ||
478 | /* port->lock held by caller. */ | 478 | /* port->lock held by caller. */ |
479 | static void sunsab_start_tx(struct uart_port *port, unsigned int tty_start) | 479 | static void sunsab_start_tx(struct uart_port *port) |
480 | { | 480 | { |
481 | struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; | 481 | struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; |
482 | struct circ_buf *xmit = &up->port.info->xmit; | 482 | struct circ_buf *xmit = &up->port.info->xmit; |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index d57a3553aea3..0cc879eb1c02 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -255,21 +255,27 @@ static void disable_rsa(struct uart_sunsu_port *up) | |||
255 | } | 255 | } |
256 | #endif /* CONFIG_SERIAL_8250_RSA */ | 256 | #endif /* CONFIG_SERIAL_8250_RSA */ |
257 | 257 | ||
258 | static void sunsu_stop_tx(struct uart_port *port, unsigned int tty_stop) | 258 | static inline void __stop_tx(struct uart_sunsu_port *p) |
259 | { | ||
260 | if (p->ier & UART_IER_THRI) { | ||
261 | p->ier &= ~UART_IER_THRI; | ||
262 | serial_out(p, UART_IER, p->ier); | ||
263 | } | ||
264 | } | ||
265 | |||
266 | static void sunsu_stop_tx(struct uart_port *port) | ||
259 | { | 267 | { |
260 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; | 268 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; |
261 | 269 | ||
262 | if (up->ier & UART_IER_THRI) { | 270 | __stop_tx(up); |
263 | up->ier &= ~UART_IER_THRI; | 271 | |
264 | serial_out(up, UART_IER, up->ier); | 272 | if (up->port.type == PORT_16C950 && tty_stop /*FIXME*/) { |
265 | } | ||
266 | if (up->port.type == PORT_16C950 && tty_stop) { | ||
267 | up->acr |= UART_ACR_TXDIS; | 273 | up->acr |= UART_ACR_TXDIS; |
268 | serial_icr_write(up, UART_ACR, up->acr); | 274 | serial_icr_write(up, UART_ACR, up->acr); |
269 | } | 275 | } |
270 | } | 276 | } |
271 | 277 | ||
272 | static void sunsu_start_tx(struct uart_port *port, unsigned int tty_start) | 278 | static void sunsu_start_tx(struct uart_port *port) |
273 | { | 279 | { |
274 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; | 280 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; |
275 | 281 | ||
@@ -280,7 +286,7 @@ static void sunsu_start_tx(struct uart_port *port, unsigned int tty_start) | |||
280 | /* | 286 | /* |
281 | * We only do this from uart_start | 287 | * We only do this from uart_start |
282 | */ | 288 | */ |
283 | if (tty_start && up->port.type == PORT_16C950) { | 289 | if (tty_start && up->port.type == PORT_16C950 /*FIXME*/) { |
284 | up->acr &= ~UART_ACR_TXDIS; | 290 | up->acr &= ~UART_ACR_TXDIS; |
285 | serial_icr_write(up, UART_ACR, up->acr); | 291 | serial_icr_write(up, UART_ACR, up->acr); |
286 | } | 292 | } |
@@ -413,8 +419,12 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up) | |||
413 | up->port.x_char = 0; | 419 | up->port.x_char = 0; |
414 | return; | 420 | return; |
415 | } | 421 | } |
416 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 422 | if (uart_tx_stopped(&up->port)) { |
417 | sunsu_stop_tx(&up->port, 0); | 423 | sunsu_stop_tx(&up->port); |
424 | return; | ||
425 | } | ||
426 | if (uart_circ_empty(xmit)) { | ||
427 | __stop_tx(up); | ||
418 | return; | 428 | return; |
419 | } | 429 | } |
420 | 430 | ||
@@ -431,7 +441,7 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up) | |||
431 | uart_write_wakeup(&up->port); | 441 | uart_write_wakeup(&up->port); |
432 | 442 | ||
433 | if (uart_circ_empty(xmit)) | 443 | if (uart_circ_empty(xmit)) |
434 | sunsu_stop_tx(&up->port, 0); | 444 | __stop_tx(up); |
435 | } | 445 | } |
436 | 446 | ||
437 | static _INLINE_ void check_modem_status(struct uart_sunsu_port *up) | 447 | static _INLINE_ void check_modem_status(struct uart_sunsu_port *up) |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index bff42a7b89d0..d75445738c88 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -684,7 +684,7 @@ static void sunzilog_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
684 | } | 684 | } |
685 | 685 | ||
686 | /* The port lock is held and interrupts are disabled. */ | 686 | /* The port lock is held and interrupts are disabled. */ |
687 | static void sunzilog_stop_tx(struct uart_port *port, unsigned int tty_stop) | 687 | static void sunzilog_stop_tx(struct uart_port *port) |
688 | { | 688 | { |
689 | struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; | 689 | struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; |
690 | 690 | ||
@@ -692,7 +692,7 @@ static void sunzilog_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
692 | } | 692 | } |
693 | 693 | ||
694 | /* The port lock is held and interrupts are disabled. */ | 694 | /* The port lock is held and interrupts are disabled. */ |
695 | static void sunzilog_start_tx(struct uart_port *port, unsigned int tty_start) | 695 | static void sunzilog_start_tx(struct uart_port *port) |
696 | { | 696 | { |
697 | struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; | 697 | struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; |
698 | struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(port); | 698 | struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(port); |
diff --git a/drivers/serial/uart00.c b/drivers/serial/uart00.c index 186f1300cead..47b504ff38b2 100644 --- a/drivers/serial/uart00.c +++ b/drivers/serial/uart00.c | |||
@@ -87,7 +87,7 @@ | |||
87 | #define UART_TX_READY(s) (((s) & UART_TSR_TX_LEVEL_MSK) < 15) | 87 | #define UART_TX_READY(s) (((s) & UART_TSR_TX_LEVEL_MSK) < 15) |
88 | //#define UART_TX_EMPTY(p) ((UART_GET_FR(p) & UART00_UARTFR_TMSK) == 0) | 88 | //#define UART_TX_EMPTY(p) ((UART_GET_FR(p) & UART00_UARTFR_TMSK) == 0) |
89 | 89 | ||
90 | static void uart00_stop_tx(struct uart_port *port, unsigned int tty_stop) | 90 | static void uart00_stop_tx(struct uart_port *port) |
91 | { | 91 | { |
92 | UART_PUT_IEC(port, UART_IEC_TIE_MSK); | 92 | UART_PUT_IEC(port, UART_IEC_TIE_MSK); |
93 | } | 93 | } |
@@ -199,7 +199,7 @@ static void uart00_tx_chars(struct uart_port *port) | |||
199 | return; | 199 | return; |
200 | } | 200 | } |
201 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 201 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
202 | uart00_stop_tx(port, 0); | 202 | uart00_stop_tx(port); |
203 | return; | 203 | return; |
204 | } | 204 | } |
205 | 205 | ||
@@ -218,10 +218,10 @@ static void uart00_tx_chars(struct uart_port *port) | |||
218 | uart_write_wakeup(port); | 218 | uart_write_wakeup(port); |
219 | 219 | ||
220 | if (uart_circ_empty(xmit)) | 220 | if (uart_circ_empty(xmit)) |
221 | uart00_stop_tx(port, 0); | 221 | uart00_stop_tx(port); |
222 | } | 222 | } |
223 | 223 | ||
224 | static void uart00_start_tx(struct uart_port *port, unsigned int tty_start) | 224 | static void uart00_start_tx(struct uart_port *port) |
225 | { | 225 | { |
226 | UART_PUT_IES(port, UART_IES_TIE_MSK); | 226 | UART_PUT_IES(port, UART_IES_TIE_MSK); |
227 | uart00_tx_chars(port); | 227 | uart00_tx_chars(port); |
diff --git a/drivers/serial/v850e_uart.c b/drivers/serial/v850e_uart.c index bb482780a41d..9378895a8d56 100644 --- a/drivers/serial/v850e_uart.c +++ b/drivers/serial/v850e_uart.c | |||
@@ -240,7 +240,7 @@ console_initcall(v850e_uart_console_init); | |||
240 | 240 | ||
241 | /* TX/RX interrupt handlers. */ | 241 | /* TX/RX interrupt handlers. */ |
242 | 242 | ||
243 | static void v850e_uart_stop_tx (struct uart_port *port, unsigned tty_stop); | 243 | static void v850e_uart_stop_tx (struct uart_port *port); |
244 | 244 | ||
245 | void v850e_uart_tx (struct uart_port *port) | 245 | void v850e_uart_tx (struct uart_port *port) |
246 | { | 246 | { |
@@ -339,14 +339,14 @@ static unsigned v850e_uart_get_mctrl (struct uart_port *port) | |||
339 | return mctrl; | 339 | return mctrl; |
340 | } | 340 | } |
341 | 341 | ||
342 | static void v850e_uart_start_tx (struct uart_port *port, unsigned tty_start) | 342 | static void v850e_uart_start_tx (struct uart_port *port) |
343 | { | 343 | { |
344 | v850e_intc_disable_irq (V850E_UART_TX_IRQ (port->line)); | 344 | v850e_intc_disable_irq (V850E_UART_TX_IRQ (port->line)); |
345 | v850e_uart_tx (port); | 345 | v850e_uart_tx (port); |
346 | v850e_intc_enable_irq (V850E_UART_TX_IRQ (port->line)); | 346 | v850e_intc_enable_irq (V850E_UART_TX_IRQ (port->line)); |
347 | } | 347 | } |
348 | 348 | ||
349 | static void v850e_uart_stop_tx (struct uart_port *port, unsigned tty_stop) | 349 | static void v850e_uart_stop_tx (struct uart_port *port) |
350 | { | 350 | { |
351 | v850e_intc_disable_irq (V850E_UART_TX_IRQ (port->line)); | 351 | v850e_intc_disable_irq (V850E_UART_TX_IRQ (port->line)); |
352 | } | 352 | } |
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c index 1f985327b0d4..0c5d65a08f6e 100644 --- a/drivers/serial/vr41xx_siu.c +++ b/drivers/serial/vr41xx_siu.c | |||
@@ -284,7 +284,7 @@ static unsigned int siu_get_mctrl(struct uart_port *port) | |||
284 | return mctrl; | 284 | return mctrl; |
285 | } | 285 | } |
286 | 286 | ||
287 | static void siu_stop_tx(struct uart_port *port, unsigned int tty_stop) | 287 | static void siu_stop_tx(struct uart_port *port) |
288 | { | 288 | { |
289 | unsigned long flags; | 289 | unsigned long flags; |
290 | uint8_t ier; | 290 | uint8_t ier; |
@@ -298,7 +298,7 @@ static void siu_stop_tx(struct uart_port *port, unsigned int tty_stop) | |||
298 | spin_unlock_irqrestore(&port->lock, flags); | 298 | spin_unlock_irqrestore(&port->lock, flags); |
299 | } | 299 | } |
300 | 300 | ||
301 | static void siu_start_tx(struct uart_port *port, unsigned int tty_start) | 301 | static void siu_start_tx(struct uart_port *port) |
302 | { | 302 | { |
303 | unsigned long flags; | 303 | unsigned long flags; |
304 | uint8_t ier; | 304 | uint8_t ier; |
@@ -458,7 +458,7 @@ static inline void transmit_chars(struct uart_port *port) | |||
458 | } | 458 | } |
459 | 459 | ||
460 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { | 460 | if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { |
461 | siu_stop_tx(port, 0); | 461 | siu_stop_tx(port); |
462 | return; | 462 | return; |
463 | } | 463 | } |
464 | 464 | ||
@@ -474,7 +474,7 @@ static inline void transmit_chars(struct uart_port *port) | |||
474 | uart_write_wakeup(port); | 474 | uart_write_wakeup(port); |
475 | 475 | ||
476 | if (uart_circ_empty(xmit)) | 476 | if (uart_circ_empty(xmit)) |
477 | siu_stop_tx(port, 0); | 477 | siu_stop_tx(port); |
478 | } | 478 | } |
479 | 479 | ||
480 | static irqreturn_t siu_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 480 | static irqreturn_t siu_interrupt(int irq, void *dev_id, struct pt_regs *regs) |