Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge HEAD from master.kernel.org:/home/rmk/linux-2.6-serial

+200 -393
+4 -11
Documentation/serial/driver
··· 111 111 Interrupts: locally disabled. 112 112 This call must not sleep 113 113 114 - stop_tx(port,tty_stop) 114 + stop_tx(port) 115 115 Stop transmitting characters. This might be due to the CTS 116 116 line becoming inactive or the tty layer indicating we want 117 - to stop transmission. 118 - 119 - tty_stop: 1 if this call is due to the TTY layer issuing a 120 - TTY stop to the driver (equiv to rs_stop). 117 + to stop transmission due to an XOFF character. 121 118 122 119 Locking: port->lock taken. 123 120 Interrupts: locally disabled. 124 121 This call must not sleep 125 122 126 - start_tx(port,tty_start) 127 - start transmitting characters. (incidentally, nonempty will 128 - always be nonzero, and shouldn't be used - it will be dropped). 129 - 130 - tty_start: 1 if this call was due to the TTY layer issuing 131 - a TTY start to the driver (equiv to rs_start) 123 + start_tx(port) 124 + start transmitting characters. 132 125 133 126 Locking: port->lock taken. 134 127 Interrupts: locally disabled.
+12 -9
drivers/char/mwave/mwavedd.c
··· 57 57 #include <linux/sched.h> 58 58 #include <linux/spinlock.h> 59 59 #include <linux/delay.h> 60 + #include <linux/serial_8250.h> 60 61 #include "smapi.h" 61 62 #include "mwavedd.h" 62 63 #include "3780i.h" ··· 411 410 412 411 static int register_serial_portandirq(unsigned int port, int irq) 413 412 { 414 - struct serial_struct serial; 415 - 413 + struct uart_port uart; 414 + 416 415 switch ( port ) { 417 416 case 0x3f8: 418 417 case 0x2f8: ··· 443 442 } /* switch */ 444 443 /* irq is okay */ 445 444 446 - memset(&serial, 0, sizeof(serial)); 447 - serial.port = port; 448 - serial.irq = irq; 449 - serial.flags = ASYNC_SHARE_IRQ; 450 - 451 - return register_serial(&serial); 445 + memset(&uart, 0, sizeof(struct uart_port)); 446 + 447 + uart.uartclk = 1843200; 448 + uart.iobase = port; 449 + uart.irq = irq; 450 + uart.iotype = UPIO_PORT; 451 + uart.flags = UPF_SHARE_IRQ; 452 + return serial8250_register_port(&uart); 452 453 } 453 454 454 455 ··· 526 523 #endif 527 524 528 525 if ( pDrvData->sLine >= 0 ) { 529 - unregister_serial(pDrvData->sLine); 526 + serial8250_unregister_port(pDrvData->sLine); 530 527 } 531 528 if (pDrvData->bMwaveDevRegistered) { 532 529 misc_deregister(&mwave_misc_dev);
+1 -1
drivers/misc/Kconfig
··· 6 6 7 7 config IBM_ASM 8 8 tristate "Device driver for IBM RSA service processor" 9 - depends on X86 && PCI && EXPERIMENTAL 9 + depends on X86 && PCI && EXPERIMENTAL && BROKEN 10 10 ---help--- 11 11 This option enables device driver support for in-band access to the 12 12 IBM RSA (Condor) service processor in eServer xSeries systems.
+1 -1
drivers/net/Kconfig
··· 447 447 448 448 config SGI_IOC3_ETH 449 449 bool "SGI IOC3 Ethernet" 450 - depends on NET_ETHERNET && PCI && SGI_IP27 450 + depends on NET_ETHERNET && PCI && SGI_IP27 && BROKEN 451 451 select CRC32 452 452 select MII 453 453 help
+4 -6
drivers/serial/21285.c
··· 58 58 * int((BAUD_BASE - (baud >> 1)) / baud) 59 59 */ 60 60 61 - static void 62 - serial21285_stop_tx(struct uart_port *port, unsigned int tty_stop) 61 + static void serial21285_stop_tx(struct uart_port *port) 63 62 { 64 63 if (tx_enabled(port)) { 65 64 disable_irq(IRQ_CONTX); ··· 66 67 } 67 68 } 68 69 69 - static void 70 - serial21285_start_tx(struct uart_port *port, unsigned int tty_start) 70 + static void serial21285_start_tx(struct uart_port *port) 71 71 { 72 72 if (!tx_enabled(port)) { 73 73 enable_irq(IRQ_CONTX); ··· 146 148 goto out; 147 149 } 148 150 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 149 - serial21285_stop_tx(port, 0); 151 + serial21285_stop_tx(port); 150 152 goto out; 151 153 } 152 154 ··· 162 164 uart_write_wakeup(port); 163 165 164 166 if (uart_circ_empty(xmit)) 165 - serial21285_stop_tx(port, 0); 167 + serial21285_stop_tx(port); 166 168 167 169 out: 168 170 return IRQ_HANDLED;
+7 -82
drivers/serial/8250.c
··· 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 1006 struct uart_8250_port *up = (struct uart_8250_port *)port; 1007 1007 ··· 1018 1018 1019 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 1023 struct uart_8250_port *up = (struct uart_8250_port *)port; 1024 1024 ··· 1158 1158 up->port.x_char = 0; 1159 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 1166 __stop_tx(up); 1163 1167 return; 1164 1168 } ··· 2590 2586 MODULE_PARM_DESC(probe_rsa, "Probe I/O ports for RSA"); 2591 2587 #endif 2592 2588 MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); 2593 - 2594 - /** 2595 - * register_serial - configure a 16x50 serial port at runtime 2596 - * @req: request structure 2597 - * 2598 - * Configure the serial port specified by the request. If the 2599 - * port exists and is in use an error is returned. If the port 2600 - * is not currently in the table it is added. 2601 - * 2602 - * The port is then probed and if necessary the IRQ is autodetected 2603 - * If this fails an error is returned. 2604 - * 2605 - * On success the port is ready to use and the line number is returned. 2606 - * 2607 - * Note: this function is deprecated - use serial8250_register_port 2608 - * instead. 2609 - */ 2610 - int register_serial(struct serial_struct *req) 2611 - { 2612 - struct uart_port port; 2613 - 2614 - port.iobase = req->port; 2615 - port.membase = req->iomem_base; 2616 - port.irq = req->irq; 2617 - port.uartclk = req->baud_base * 16; 2618 - port.fifosize = req->xmit_fifo_size; 2619 - port.regshift = req->iomem_reg_shift; 2620 - port.iotype = req->io_type; 2621 - port.flags = req->flags | UPF_BOOT_AUTOCONF; 2622 - port.mapbase = req->iomap_base; 2623 - port.dev = NULL; 2624 - 2625 - if (share_irqs) 2626 - port.flags |= UPF_SHARE_IRQ; 2627 - 2628 - if (HIGH_BITS_OFFSET) 2629 - port.iobase |= (long) req->port_high << HIGH_BITS_OFFSET; 2630 - 2631 - /* 2632 - * If a clock rate wasn't specified by the low level driver, then 2633 - * default to the standard clock rate. This should be 115200 (*16) 2634 - * and should not depend on the architecture's BASE_BAUD definition. 2635 - * However, since this API will be deprecated, it's probably a 2636 - * better idea to convert the drivers to use the new API 2637 - * (serial8250_register_port and serial8250_unregister_port). 2638 - */ 2639 - if (port.uartclk == 0) { 2640 - printk(KERN_WARNING 2641 - "Serial: registering port at [%08x,%08lx,%p] irq %d with zero baud_base\n", 2642 - port.iobase, port.mapbase, port.membase, port.irq); 2643 - printk(KERN_WARNING "Serial: see %s:%d for more information\n", 2644 - __FILE__, __LINE__); 2645 - dump_stack(); 2646 - 2647 - /* 2648 - * Fix it up for now, but this is only a temporary measure. 2649 - */ 2650 - port.uartclk = BASE_BAUD * 16; 2651 - } 2652 - 2653 - return serial8250_register_port(&port); 2654 - } 2655 - EXPORT_SYMBOL(register_serial); 2656 - 2657 - /** 2658 - * unregister_serial - remove a 16x50 serial port at runtime 2659 - * @line: serial line number 2660 - * 2661 - * Remove one serial port. This may not be called from interrupt 2662 - * context. We hand the port back to our local PM control. 2663 - * 2664 - * Note: this function is deprecated - use serial8250_unregister_port 2665 - * instead. 2666 - */ 2667 - void unregister_serial(int line) 2668 - { 2669 - serial8250_unregister_port(line); 2670 - } 2671 - EXPORT_SYMBOL(unregister_serial);
+1 -5
drivers/serial/8250.h
··· 16 16 */ 17 17 18 18 #include <linux/config.h> 19 - 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); 19 + #include <linux/serial_8250.h> 24 20 25 21 struct old_serial_port { 26 22 unsigned int uart;
+1 -1
drivers/serial/Kconfig
··· 830 830 831 831 config SERIAL_TXX9 832 832 bool "TMPTX39XX/49XX SIO support" 833 - depends HAS_TXX9_SERIAL 833 + depends HAS_TXX9_SERIAL && BROKEN 834 834 select SERIAL_CORE 835 835 default y 836 836
+4 -4
drivers/serial/amba-pl010.c
··· 105 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 110 unsigned int cr; 111 111 ··· 114 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 119 unsigned int cr; 120 120 ··· 219 219 return; 220 220 } 221 221 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 222 - pl010_stop_tx(port, 0); 222 + pl010_stop_tx(port); 223 223 return; 224 224 } 225 225 ··· 236 236 uart_write_wakeup(port); 237 237 238 238 if (uart_circ_empty(xmit)) 239 - pl010_stop_tx(port, 0); 239 + pl010_stop_tx(port); 240 240 } 241 241 242 242 static void pl010_modem_status(struct uart_port *port)
+4 -4
drivers/serial/amba-pl011.c
··· 74 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 79 struct uart_amba_port *uap = (struct uart_amba_port *)port; 80 80 ··· 82 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 87 struct uart_amba_port *uap = (struct uart_amba_port *)port; 88 88 ··· 184 184 return; 185 185 } 186 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 188 return; 189 189 } 190 190 ··· 201 201 uart_write_wakeup(&uap->port); 202 202 203 203 if (uart_circ_empty(xmit)) 204 - pl011_stop_tx(&uap->port, 0); 204 + pl011_stop_tx(&uap->port); 205 205 } 206 206 207 207 static void pl011_modem_status(struct uart_amba_port *uap)
+4 -4
drivers/serial/au1x00_uart.c
··· 200 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 205 struct uart_8250_port *up = (struct uart_8250_port *)port; 206 206 ··· 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 215 struct uart_8250_port *up = (struct uart_8250_port *)port; 216 216 ··· 337 337 return; 338 338 } 339 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 341 return; 342 342 } 343 343 ··· 356 356 DEBUG_INTR("THRE..."); 357 357 358 358 if (uart_circ_empty(xmit)) 359 - serial8250_stop_tx(&up->port, 0); 359 + serial8250_stop_tx(&up->port); 360 360 } 361 361 362 362 static _INLINE_ void check_modem_status(struct uart_8250_port *up)
+4 -6
drivers/serial/clps711x.c
··· 69 69 70 70 #define tx_enabled(port) ((port)->unused[0]) 71 71 72 - static void 73 - clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop) 72 + static void clps711xuart_stop_tx(struct uart_port *port) 74 73 { 75 74 if (tx_enabled(port)) { 76 75 disable_irq(TX_IRQ(port)); ··· 77 78 } 78 79 } 79 80 80 - static void 81 - clps711xuart_start_tx(struct uart_port *port, unsigned int tty_start) 81 + static void clps711xuart_start_tx(struct uart_port *port) 82 82 { 83 83 if (!tx_enabled(port)) { 84 84 enable_irq(TX_IRQ(port)); ··· 163 165 return IRQ_HANDLED; 164 166 } 165 167 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 166 - clps711xuart_stop_tx(port, 0); 168 + clps711xuart_stop_tx(port); 167 169 return IRQ_HANDLED; 168 170 } 169 171 ··· 180 182 uart_write_wakeup(port); 181 183 182 184 if (uart_circ_empty(xmit)) 183 - clps711xuart_stop_tx(port, 0); 185 + clps711xuart_stop_tx(port); 184 186 185 187 return IRQ_HANDLED; 186 188 }
+4 -4
drivers/serial/cpm_uart/cpm_uart_core.c
··· 124 124 /* 125 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 129 struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; 130 130 volatile smc_t *smcp = pinfo->smcp; ··· 141 141 /* 142 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 146 struct uart_cpm_port *pinfo = (struct uart_cpm_port *)port; 147 147 volatile smc_t *smcp = pinfo->smcp; ··· 623 623 } 624 624 625 625 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 626 - cpm_uart_stop_tx(port, 0); 626 + cpm_uart_stop_tx(port); 627 627 return 0; 628 628 } 629 629 ··· 656 656 uart_write_wakeup(port); 657 657 658 658 if (uart_circ_empty(xmit)) { 659 - cpm_uart_stop_tx(port, 0); 659 + cpm_uart_stop_tx(port); 660 660 return 0; 661 661 } 662 662
+5 -5
drivers/serial/dz.c
··· 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 117 struct dz_port *dport = (struct dz_port *)uport; 118 118 unsigned short tmp, mask = 1 << dport->port.line; ··· 125 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 130 struct dz_port *dport = (struct dz_port *)uport; 131 131 unsigned short tmp, mask = 1 << dport->port.line; ··· 290 290 } 291 291 /* if nothing to do or stopped or hardware stopped */ 292 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 294 return; 295 295 } 296 296 ··· 308 308 309 309 /* Are we done */ 310 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 440 */ 441 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 /*
+5 -7
drivers/serial/icom.c
··· 989 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 994 unsigned char cmdReg; 995 995 996 - if (tty_stop) { 997 - trace(ICOM_PORT, "STOP", 0); 998 - cmdReg = readb(&ICOM_PORT->dram->CmdReg); 999 - writeb(cmdReg | CMD_HOLD_XMIT, &ICOM_PORT->dram->CmdReg); 1000 - } 996 + trace(ICOM_PORT, "STOP", 0); 997 + cmdReg = readb(&ICOM_PORT->dram->CmdReg); 998 + writeb(cmdReg | CMD_HOLD_XMIT, &ICOM_PORT->dram->CmdReg); 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 1003 unsigned char cmdReg; 1006 1004
+23 -5
drivers/serial/imx.c
··· 124 124 /* 125 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 129 struct imx_port *sport = (struct imx_port *)port; 130 130 UCR1((u32)sport->port.membase) &= ~UCR1_TXMPTYEN; ··· 165 165 } while (!(UTS((u32)sport->port.membase) & UTS_TXFULL)); 166 166 167 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 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 176 struct imx_port *sport = (struct imx_port *)port; 177 177 ··· 196 196 } 197 197 198 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 200 goto out; 201 201 } 202 202 ··· 291 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 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 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 /*
+2 -4
drivers/serial/ioc4_serial.c
··· 2373 2373 /** 2374 2374 * ic4_stop_tx - stop the transmitter 2375 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 ··· 2470 2471 /** 2471 2472 * ic4_start_tx - Start transmitter, flush any output 2472 2473 * @port: Port to operate on 2473 - * @tty_stop: Set to 1 if called via uart_start 2474 2474 * 2475 2475 */ 2476 - static void ic4_start_tx(struct uart_port *the_port, unsigned int tty_stop) 2476 + static void ic4_start_tx(struct uart_port *the_port) 2477 2477 { 2478 2478 struct ioc4_port *port = get_ioc4_port(the_port); 2479 2479 unsigned long flags;
+2 -2
drivers/serial/ip22zilog.c
··· 592 592 } 593 593 594 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 597 struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port; 598 598 ··· 600 600 } 601 601 602 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 605 struct uart_ip22zilog_port *up = (struct uart_ip22zilog_port *) port; 606 606 struct zilog_channel *channel = ZILOG_CHANNEL_FROM_PORT(port);
+2 -2
drivers/serial/jsm/jsm_tty.c
··· 113 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 118 struct jsm_channel *channel = (struct jsm_channel *)port; 119 119 ··· 125 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 130 struct jsm_channel *channel = (struct jsm_channel *)port; 131 131
+4 -4
drivers/serial/m32r_sio.c
··· 275 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 280 struct uart_sio_port *up = (struct uart_sio_port *)port; 281 281 ··· 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 290 #ifdef CONFIG_SERIAL_M32R_PLDSIO 291 291 struct uart_sio_port *up = (struct uart_sio_port *)port; ··· 425 425 return; 426 426 } 427 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 429 return; 430 430 } 431 431 ··· 446 446 DEBUG_INTR("THRE..."); 447 447 448 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 /*
+4 -4
drivers/serial/mpc52xx_uart.c
··· 119 119 } 120 120 121 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 124 /* port->lock taken by caller */ 125 125 port->read_status_mask &= ~MPC52xx_PSC_IMR_TXRDY; ··· 127 127 } 128 128 129 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 132 /* port->lock taken by caller */ 133 133 port->read_status_mask |= MPC52xx_PSC_IMR_TXRDY; ··· 485 485 486 486 /* Nothing to do ? */ 487 487 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 488 - mpc52xx_uart_stop_tx(port,0); 488 + mpc52xx_uart_stop_tx(port); 489 489 return 0; 490 490 } 491 491 ··· 504 504 505 505 /* Maybe we're done after all */ 506 506 if (uart_circ_empty(xmit)) { 507 - mpc52xx_uart_stop_tx(port,0); 507 + mpc52xx_uart_stop_tx(port); 508 508 return 0; 509 509 } 510 510
+4 -4
drivers/serial/mpsc.c
··· 1072 1072 } 1073 1073 1074 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 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 1081 mpsc_freeze(pi); 1082 1082 return; 1083 1083 } 1084 1084 1085 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 1088 struct mpsc_port_info *pi = (struct mpsc_port_info *)port; 1089 1089 ··· 1091 1091 mpsc_copy_tx_data(pi); 1092 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 1095 return; 1096 1096 } 1097 1097
+4 -6
drivers/serial/mux.c
··· 111 111 /** 112 112 * mux_stop_tx - Stop transmitting characters. 113 113 * @port: Ptr to the uart_port. 114 - * @tty_stop: tty layer issue this command? 115 114 * 116 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 122 * mux_start_tx - Start transmitting characters. 124 123 * @port: Ptr to the uart_port. 125 - * @tty_start: tty layer issue this command? 126 124 * 127 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 ··· 179 181 } 180 182 181 183 if(uart_circ_empty(xmit) || uart_tx_stopped(port)) { 182 - mux_stop_tx(port, 0); 184 + mux_stop_tx(port); 183 185 return; 184 186 } 185 187 ··· 200 202 uart_write_wakeup(port); 201 203 202 204 if (uart_circ_empty(xmit)) 203 - mux_stop_tx(port, 0); 205 + mux_stop_tx(port); 204 206 } 205 207 206 208 /**
+3 -4
drivers/serial/pmac_zilog.c
··· 630 630 631 631 /* 632 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 634 - * the meaning of the tty_stop bit ? XXX 633 + * though for DMA, we will have to do a bit more. 635 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 638 to_pmz(port)->flags |= PMACZILOG_FLAG_TX_STOPPED; 640 639 } ··· 642 643 * Kick the Tx side. 643 644 * The port lock is held and interrupts are disabled. 644 645 */ 645 - static void pmz_start_tx(struct uart_port *port, unsigned int tty_start) 646 + static void pmz_start_tx(struct uart_port *port) 646 647 { 647 648 struct uart_pmac_port *uap = to_pmz(port); 648 649 unsigned char status;
+4 -4
drivers/serial/pxa.c
··· 80 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 85 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 86 86 ··· 185 185 return; 186 186 } 187 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 189 return; 190 190 } 191 191 ··· 203 203 204 204 205 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 211 struct uart_pxa_port *up = (struct uart_pxa_port *)port; 212 212
+4 -6
drivers/serial/s3c2410.c
··· 246 246 spin_unlock_irqrestore(&port->lock, flags); 247 247 } 248 248 249 - static void 250 - s3c24xx_serial_stop_tx(struct uart_port *port, unsigned int tty_stop) 249 + static void s3c24xx_serial_stop_tx(struct uart_port *port) 251 250 { 252 251 if (tx_enabled(port)) { 253 252 disable_irq(TX_IRQ(port)); ··· 256 257 } 257 258 } 258 259 259 - static void 260 - s3c24xx_serial_start_tx(struct uart_port *port, unsigned int tty_start) 260 + static void s3c24xx_serial_start_tx(struct uart_port *port) 261 261 { 262 262 if (!tx_enabled(port)) { 263 263 if (port->flags & UPF_CONS_FLOW) ··· 422 424 */ 423 425 424 426 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 425 - s3c24xx_serial_stop_tx(port, 0); 427 + s3c24xx_serial_stop_tx(port); 426 428 goto out; 427 429 } 428 430 ··· 441 443 uart_write_wakeup(port); 442 444 443 445 if (uart_circ_empty(xmit)) 444 - s3c24xx_serial_stop_tx(port, 0); 446 + s3c24xx_serial_stop_tx(port); 445 447 446 448 out: 447 449 return IRQ_HANDLED;
+4 -4
drivers/serial/sa1100.c
··· 145 145 /* 146 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 150 struct sa1100_port *sport = (struct sa1100_port *)port; 151 151 u32 utcr3; ··· 158 158 /* 159 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 163 struct sa1100_port *sport = (struct sa1100_port *)port; 164 164 unsigned long flags; ··· 264 264 sa1100_mctrl_check(sport); 265 265 266 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 268 return; 269 269 } 270 270 ··· 284 284 uart_write_wakeup(&sport->port); 285 285 286 286 if (uart_circ_empty(xmit)) 287 - sa1100_stop_tx(&sport->port, 0); 287 + sa1100_stop_tx(&sport->port); 288 288 } 289 289 290 290 static irqreturn_t sa1100_int(int irq, void *dev_id, struct pt_regs *regs)
+6 -138
drivers/serial/serial_core.c
··· 80 80 unsigned long flags; 81 81 82 82 spin_lock_irqsave(&port->lock, flags); 83 - port->ops->stop_tx(port, 1); 83 + port->ops->stop_tx(port); 84 84 spin_unlock_irqrestore(&port->lock, flags); 85 85 } 86 86 ··· 91 91 92 92 if (!uart_circ_empty(&state->info->xmit) && state->info->xmit.buf && 93 93 !tty->stopped && !tty->hw_stopped) 94 - port->ops->start_tx(port, 1); 94 + port->ops->start_tx(port); 95 95 } 96 96 97 97 static void uart_start(struct tty_struct *tty) ··· 542 542 port->x_char = ch; 543 543 if (ch) { 544 544 spin_lock_irqsave(&port->lock, flags); 545 - port->ops->start_tx(port, 0); 545 + port->ops->start_tx(port); 546 546 spin_unlock_irqrestore(&port->lock, flags); 547 547 } 548 548 } ··· 1146 1146 spin_lock_irqsave(&state->port->lock, flags); 1147 1147 if (!(state->port->ops->get_mctrl(state->port) & TIOCM_CTS)) { 1148 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 1151 spin_unlock_irqrestore(&state->port->lock, flags); 1152 1152 } ··· 1869 1869 struct uart_ops *ops = port->ops; 1870 1870 1871 1871 spin_lock_irq(&port->lock); 1872 - ops->stop_tx(port, 0); 1872 + ops->stop_tx(port); 1873 1873 ops->set_mctrl(port, 0); 1874 1874 ops->stop_rx(port); 1875 1875 spin_unlock_irq(&port->lock); ··· 1935 1935 uart_change_speed(state, NULL); 1936 1936 spin_lock_irq(&port->lock); 1937 1937 ops->set_mctrl(port, port->mctrl); 1938 - ops->start_tx(port, 0); 1938 + ops->start_tx(port); 1939 1939 spin_unlock_irq(&port->lock); 1940 1940 } 1941 1941 ··· 2289 2289 } 2290 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 2292 EXPORT_SYMBOL(uart_write_wakeup); 2423 2293 EXPORT_SYMBOL(uart_register_driver); 2424 2294 EXPORT_SYMBOL(uart_unregister_driver); 2425 2295 EXPORT_SYMBOL(uart_suspend_port); 2426 2296 EXPORT_SYMBOL(uart_resume_port); 2427 - EXPORT_SYMBOL(uart_register_port); 2428 - EXPORT_SYMBOL(uart_unregister_port); 2429 2297 EXPORT_SYMBOL(uart_add_one_port); 2430 2298 EXPORT_SYMBOL(uart_remove_one_port); 2431 2299
+2 -3
drivers/serial/serial_lh7a40x.c
··· 112 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 117 BIT_CLR (port, UART_R_INTEN, TxInt); 118 118 } 119 119 120 - static void lh7a40xuart_start_tx (struct uart_port* port, 121 - unsigned int tty_start) 120 + static void lh7a40xuart_start_tx (struct uart_port* port) 122 121 { 123 122 BIT_SET (port, UART_R_INTEN, TxInt); 124 123
+4 -4
drivers/serial/serial_txx9.c
··· 253 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 258 struct uart_txx9_port *up = (struct uart_txx9_port *)port; 259 259 unsigned long flags; ··· 263 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 268 struct uart_txx9_port *up = (struct uart_txx9_port *)port; 269 269 unsigned long flags; ··· 372 372 return; 373 373 } 374 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 376 return; 377 377 } 378 378 ··· 389 389 uart_write_wakeup(&up->port); 390 390 391 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 395 static irqreturn_t serial_txx9_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+6 -6
drivers/serial/sh-sci.c
··· 79 79 #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */ 80 80 81 81 /* Function prototypes */ 82 - static void sci_stop_tx(struct uart_port *port, unsigned int tty_stop); 83 - static void sci_start_tx(struct uart_port *port, unsigned int tty_start); 82 + static void sci_stop_tx(struct uart_port *port); 83 + static void sci_start_tx(struct uart_port *port); 84 84 static void sci_start_rx(struct uart_port *port, unsigned int tty_start); 85 85 static void sci_stop_rx(struct uart_port *port); 86 86 static int sci_request_irq(struct sci_port *port); ··· 455 455 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) 456 456 uart_write_wakeup(port); 457 457 if (uart_circ_empty(xmit)) { 458 - sci_stop_tx(port, 0); 458 + sci_stop_tx(port); 459 459 } else { 460 460 local_irq_save(flags); 461 461 ctrl = sci_in(port, SCSCR); ··· 900 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 905 struct sci_port *s = &sci_ports[port->line]; 906 906 ··· 909 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 914 unsigned long flags; 915 915 unsigned short ctrl; ··· 978 978 struct sci_port *s = &sci_ports[port->line]; 979 979 980 980 sci_stop_rx(port); 981 - sci_stop_tx(port, 1); 981 + sci_stop_tx(port); 982 982 sci_free_irq(s); 983 983 984 984 #if defined(__H8300S__)
+3 -5
drivers/serial/sn_console.c
··· 259 259 /** 260 260 * snp_stop_tx - stop the transmitter - no-op for us 261 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 ··· 324 325 /** 325 326 * snp_start_tx - Start transmitter 326 327 * @port: Port to operate on 327 - * @tty_stop: Set to 1 if called via uart_start 328 328 * 329 329 */ 330 - static void snp_start_tx(struct uart_port *port, unsigned int tty_stop) 330 + static void snp_start_tx(struct uart_port *port) 331 331 { 332 332 if (sal_console_port.sc_ops->sal_wakeup_transmit) 333 333 sal_console_port.sc_ops->sal_wakeup_transmit(&sal_console_port, ··· 613 615 uart_write_wakeup(&port->sc_port); 614 616 615 617 if (uart_circ_empty(xmit)) 616 - snp_stop_tx(&port->sc_port, 0); /* no-op for us */ 618 + snp_stop_tx(&port->sc_port); /* no-op for us */ 617 619 } 618 620 619 621 /**
+4 -4
drivers/serial/sunsab.c
··· 245 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 249 static void sunsab_tx_idle(struct uart_sunsab_port *); 250 250 251 251 static void transmit_chars(struct uart_sunsab_port *up, ··· 301 301 uart_write_wakeup(&up->port); 302 302 303 303 if (uart_circ_empty(xmit)) 304 - sunsab_stop_tx(&up->port, 0); 304 + sunsab_stop_tx(&up->port); 305 305 } 306 306 307 307 static void check_status(struct uart_sunsab_port *up, ··· 448 448 } 449 449 450 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 453 struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; 454 454 ··· 476 476 } 477 477 478 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 481 struct uart_sunsab_port *up = (struct uart_sunsab_port *) port; 482 482 struct circ_buf *xmit = &up->port.info->xmit;
+21 -11
drivers/serial/sunsu.c
··· 255 255 } 256 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 268 struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; 261 269 262 - if (up->ier & UART_IER_THRI) { 263 - up->ier &= ~UART_IER_THRI; 264 - serial_out(up, UART_IER, up->ier); 265 - } 266 - if (up->port.type == PORT_16C950 && tty_stop) { 270 + __stop_tx(up); 271 + 272 + if (up->port.type == PORT_16C950 && tty_stop /*FIXME*/) { 267 273 up->acr |= UART_ACR_TXDIS; 268 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 280 struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; 275 281 ··· 286 280 /* 287 281 * We only do this from uart_start 288 282 */ 289 - if (tty_start && up->port.type == PORT_16C950) { 283 + if (tty_start && up->port.type == PORT_16C950 /*FIXME*/) { 290 284 up->acr &= ~UART_ACR_TXDIS; 291 285 serial_icr_write(up, UART_ACR, up->acr); 292 286 } ··· 419 413 up->port.x_char = 0; 420 414 return; 421 415 } 422 - if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { 423 - sunsu_stop_tx(&up->port, 0); 416 + if (uart_tx_stopped(&up->port)) { 417 + sunsu_stop_tx(&up->port); 418 + return; 419 + } 420 + if (uart_circ_empty(xmit)) { 421 + __stop_tx(up); 424 422 return; 425 423 } 426 424 ··· 441 431 uart_write_wakeup(&up->port); 442 432 443 433 if (uart_circ_empty(xmit)) 444 - sunsu_stop_tx(&up->port, 0); 434 + __stop_tx(up); 445 435 } 446 436 447 437 static _INLINE_ void check_modem_status(struct uart_sunsu_port *up)
+2 -2
drivers/serial/sunzilog.c
··· 684 684 } 685 685 686 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 689 struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; 690 690 ··· 692 692 } 693 693 694 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 697 struct uart_sunzilog_port *up = (struct uart_sunzilog_port *) port; 698 698 struct zilog_channel __iomem *channel = ZILOG_CHANNEL_FROM_PORT(port);
+4 -4
drivers/serial/uart00.c
··· 87 87 #define UART_TX_READY(s) (((s) & UART_TSR_TX_LEVEL_MSK) < 15) 88 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 92 UART_PUT_IEC(port, UART_IEC_TIE_MSK); 93 93 } ··· 199 199 return; 200 200 } 201 201 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 202 - uart00_stop_tx(port, 0); 202 + uart00_stop_tx(port); 203 203 return; 204 204 } 205 205 ··· 218 218 uart_write_wakeup(port); 219 219 220 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 226 UART_PUT_IES(port, UART_IES_TIE_MSK); 227 227 uart00_tx_chars(port);
+3 -3
drivers/serial/v850e_uart.c
··· 240 240 241 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 245 void v850e_uart_tx (struct uart_port *port) 246 246 { ··· 339 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 344 v850e_intc_disable_irq (V850E_UART_TX_IRQ (port->line)); 345 345 v850e_uart_tx (port); 346 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 351 v850e_intc_disable_irq (V850E_UART_TX_IRQ (port->line)); 352 352 }
+4 -4
drivers/serial/vr41xx_siu.c
··· 284 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 289 unsigned long flags; 290 290 uint8_t ier; ··· 298 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 303 unsigned long flags; 304 304 uint8_t ier; ··· 458 458 } 459 459 460 460 if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { 461 - siu_stop_tx(port, 0); 461 + siu_stop_tx(port); 462 462 return; 463 463 } 464 464 ··· 474 474 uart_write_wakeup(port); 475 475 476 476 if (uart_circ_empty(xmit)) 477 - siu_stop_tx(port, 0); 477 + siu_stop_tx(port); 478 478 } 479 479 480 480 static irqreturn_t siu_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-4
include/linux/serial.h
··· 176 176 #ifdef __KERNEL__ 177 177 #include <linux/compiler.h> 178 178 179 - /* Export to allow PCMCIA to use this - Dave Hinds */ 180 - extern int __deprecated register_serial(struct serial_struct *req); 181 - extern void __deprecated unregister_serial(int line); 182 - 183 179 /* Allow architectures to override entries in serial8250_ports[] at run time: */ 184 180 struct uart_port; /* forward declaration */ 185 181 extern int early_serial_setup(struct uart_port *port);
+16
include/linux/serial_8250.h
··· 14 14 #include <linux/serial_core.h> 15 15 #include <linux/device.h> 16 16 17 + /* 18 + * This is the platform device platform_data structure 19 + */ 17 20 struct plat_serial8250_port { 18 21 unsigned long iobase; /* io base address */ 19 22 void __iomem *membase; /* ioremap cookie or NULL */ ··· 28 25 unsigned char hub6; 29 26 unsigned int flags; /* UPF_* flags */ 30 27 }; 28 + 29 + /* 30 + * This should be used by drivers which want to register 31 + * their own 8250 ports without registering their own 32 + * platform device. Using these will make your driver 33 + * dependent on the 8250 driver. 34 + */ 35 + struct uart_port; 36 + 37 + int serial8250_register_port(struct uart_port *); 38 + void serial8250_unregister_port(int line); 39 + void serial8250_suspend_port(int line); 40 + void serial8250_resume_port(int line); 31 41 32 42 #endif
+4 -6
include/linux/serial_core.h
··· 142 142 unsigned int (*tx_empty)(struct uart_port *); 143 143 void (*set_mctrl)(struct uart_port *, unsigned int mctrl); 144 144 unsigned int (*get_mctrl)(struct uart_port *); 145 - void (*stop_tx)(struct uart_port *, unsigned int tty_stop); 146 - void (*start_tx)(struct uart_port *, unsigned int tty_start); 145 + void (*stop_tx)(struct uart_port *); 146 + void (*start_tx)(struct uart_port *); 147 147 void (*send_xchar)(struct uart_port *, char ch); 148 148 void (*stop_rx)(struct uart_port *); 149 149 void (*enable_ms)(struct uart_port *); ··· 360 360 */ 361 361 int uart_register_driver(struct uart_driver *uart); 362 362 void uart_unregister_driver(struct uart_driver *uart); 363 - void __deprecated uart_unregister_port(struct uart_driver *reg, int line); 364 - int __deprecated uart_register_port(struct uart_driver *reg, struct uart_port *port); 365 363 int uart_add_one_port(struct uart_driver *reg, struct uart_port *port); 366 364 int uart_remove_one_port(struct uart_driver *reg, struct uart_port *port); 367 365 int uart_match_port(struct uart_port *port1, struct uart_port *port2); ··· 466 468 if (tty->hw_stopped) { 467 469 if (status) { 468 470 tty->hw_stopped = 0; 469 - port->ops->start_tx(port, 0); 471 + port->ops->start_tx(port); 470 472 uart_write_wakeup(port); 471 473 } 472 474 } else { 473 475 if (!status) { 474 476 tty->hw_stopped = 1; 475 - port->ops->stop_tx(port, 0); 477 + port->ops->stop_tx(port); 476 478 } 477 479 } 478 480 }