diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-07-23 20:47:05 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-07-23 20:47:05 -0700 |
| commit | d4ea8ebe21a50da6876c45d0259259d498d13eaf (patch) | |
| tree | 749ccd108200a5edf8a9563a870088de200617c7 | |
| parent | 82e6c293a548223758531bb538ed15b577dd6e1a (diff) | |
| parent | 1c36ac5dc8a35e834c8651ce7cc5d485d8bcba3a (diff) | |
Merge bk://bk.arm.linux.org.uk:14691
into home.transmeta.com:/home/torvalds/v2.5/linux
| -rw-r--r-- | Documentation/serial/driver | 4 | ||||
| -rw-r--r-- | drivers/serial/21285.c (renamed from drivers/serial/serial_21285.c) | 29 | ||||
| -rw-r--r-- | drivers/serial/8250.c (renamed from drivers/serial/serial_8250.c) | 30 | ||||
| -rw-r--r-- | drivers/serial/8250.h (renamed from drivers/serial/serial_8250.h) | 4 | ||||
| -rw-r--r-- | drivers/serial/8250_cs.c (renamed from drivers/serial/serial_8250_cs.c) | 0 | ||||
| -rw-r--r-- | drivers/serial/8250_pci.c (renamed from drivers/serial/serial_8250_pci.c) | 6 | ||||
| -rw-r--r-- | drivers/serial/8250_pnp.c (renamed from drivers/serial/serial_8250_pnp.c) | 6 | ||||
| -rw-r--r-- | drivers/serial/Makefile | 26 | ||||
| -rw-r--r-- | drivers/serial/amba.c (renamed from drivers/serial/serial_amba.c) | 23 | ||||
| -rw-r--r-- | drivers/serial/anakin.c (renamed from drivers/serial/serial_anakin.c) | 12 | ||||
| -rw-r--r-- | drivers/serial/clps711x.c (renamed from drivers/serial/serial_clps711x.c) | 28 | ||||
| -rw-r--r-- | drivers/serial/core.c (renamed from drivers/serial/serial_core.c) | 15 | ||||
| -rw-r--r-- | drivers/serial/sa1100.c (renamed from drivers/serial/serial_sa1100.c) | 29 | ||||
| -rw-r--r-- | drivers/serial/uart00.c (renamed from drivers/serial/serial_uart00.c) | 6 |
14 files changed, 80 insertions, 138 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index 7396d0727927..105e702b9b41 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver @@ -3,7 +3,7 @@ -------------------- - $Id: driver,v 1.9 2002/07/06 16:51:43 rmk Exp $ + $Id: driver,v 1.10 2002/07/22 15:27:30 rmk Exp $ This document is meant as a brief overview of some aspects of the new serial @@ -119,7 +119,7 @@ hardware. tty_stop: 1 if this call is due to the TTY layer issuing a TTY stop to the driver (equiv to rs_stop). - Locking: none. + Locking: port->lock taken. Interrupts: caller dependent. This call must not sleep diff --git a/drivers/serial/serial_21285.c b/drivers/serial/21285.c index 0b63b3a7deb6..369e6cceb574 100644 --- a/drivers/serial/serial_21285.c +++ b/drivers/serial/21285.c @@ -1,11 +1,11 @@ /* - * linux/drivers/char/serial_21285.c + * linux/drivers/char/21285.c * * Driver for the serial port on the 21285 StrongArm-110 core logic chip. * * Based on drivers/char/serial.c * - * $Id: serial_21285.c,v 1.32 2002/07/21 08:57:55 rmk Exp $ + * $Id: 21285.c,v 1.34 2002/07/22 15:27:32 rmk Exp $ */ #include <linux/config.h> #include <linux/module.h> @@ -65,7 +65,8 @@ static const char serial21285_name[] = "Footbridge UART"; * int((BAUD_BASE - (baud >> 1)) / baud) */ -static void __serial21285_stop_tx(struct uart_port *port) +static void +serial21285_stop_tx(struct uart_port *port, unsigned int tty_stop) { if (tx_enabled(port)) { disable_irq(IRQ_CONTX); @@ -74,26 +75,12 @@ static void __serial21285_stop_tx(struct uart_port *port) } static void -serial21285_stop_tx(struct uart_port *port, unsigned int tty_stop) -{ - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - __serial21285_stop_tx(port); - spin_unlock_irqrestore(&port->lock, flags); -} - -static void serial21285_start_tx(struct uart_port *port, unsigned int tty_start) { - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); if (!tx_enabled(port)) { enable_irq(IRQ_CONTX); tx_enabled(port) = 1; } - spin_unlock_irqrestore(&port->lock, flags); } static void serial21285_stop_rx(struct uart_port *port) @@ -185,7 +172,7 @@ static void serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs) return; } if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { - __serial21285_stop_tx(port); + serial21285_stop_tx(port, 0); return; } @@ -201,7 +188,7 @@ static void serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs) uart_event(port, EVT_WRITE_WAKEUP); if (uart_circ_empty(xmit)) - __serial21285_stop_tx(port); + serial21285_stop_tx(port, 0); } static unsigned int serial21285_tx_empty(struct uart_port *port) @@ -527,7 +514,7 @@ static int __init serial21285_init(void) { int ret; - printk(KERN_INFO "Serial: 21285 driver $Revision: 1.32 $\n"); + printk(KERN_INFO "Serial: 21285 driver $Revision: 1.34 $\n"); serial21285_setup_ports(); @@ -550,4 +537,4 @@ module_exit(serial21285_exit); EXPORT_NO_SYMBOLS; MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver $Revision: 1.32 $"); +MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver $Revision: 1.34 $"); diff --git a/drivers/serial/serial_8250.c b/drivers/serial/8250.c index b763e3faa3de..51836215e1c3 100644 --- a/drivers/serial/serial_8250.c +++ b/drivers/serial/8250.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_8250.c + * linux/drivers/char/8250.c * * Driver for 8250/16550-type serial ports * @@ -12,7 +12,7 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * $Id: serial_8250.c,v 1.80 2002/07/21 08:57:55 rmk Exp $ + * $Id: 8250.c,v 1.84 2002/07/22 15:27:32 rmk Exp $ * * A note about mapbase / membase * @@ -54,7 +54,7 @@ #endif #include <linux/serial_core.h> -#include "serial_8250.h" +#include "8250.h" /* * Configuration: @@ -690,7 +690,7 @@ static void autoconfig_irq(struct uart_8250_port *up) up->port.irq = (irq > 0) ? irq : 0; } -static void __serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) +static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) { struct uart_8250_port *up = (struct uart_8250_port *)port; @@ -704,16 +704,6 @@ static void __serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) } } -static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop) -{ - struct uart_8250_port *up = (struct uart_8250_port *)port; - unsigned long flags; - - spin_lock_irqsave(&up->port.lock, flags); - __serial8250_stop_tx(port, tty_stop); - spin_unlock_irqrestore(&up->port.lock, flags); -} - static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start) { struct uart_8250_port *up = (struct uart_8250_port *)port; @@ -852,7 +842,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) return; } if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { - __serial8250_stop_tx(&up->port, 0); + serial8250_stop_tx(&up->port, 0); return; } @@ -871,7 +861,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) DEBUG_INTR("THRE..."); if (uart_circ_empty(xmit)) - __serial8250_stop_tx(&up->port, 0); + serial8250_stop_tx(&up->port, 0); } static _INLINE_ void check_modem_status(struct uart_8250_port *up) @@ -1296,8 +1286,6 @@ serial8250_change_speed(struct uart_port *port, unsigned int cflag, unsigned char cval, fcr = 0; unsigned long flags; - printk("+++ change_speed port %p cflag %08x quot %d\n", port, cflag, quot); - switch (cflag & CSIZE) { case CS5: cval = 0x00; @@ -1835,7 +1823,6 @@ static int __init serial8250_console_setup(struct console *co, char *options) if (co->index >= UART_NR) co->index = 0; port = &serial8250_ports[co->index].port; - printk("+++ index %d port %p iobase %x\n", co->index, port, port->iobase); /* * Temporary fix. @@ -1844,7 +1831,6 @@ static int __init serial8250_console_setup(struct console *co, char *options) if (options) uart_parse_options(options, &baud, &parity, &bits, &flow); - printk("+++ baud %d bits %d parity %c flow %c\n", baud, parity, bits, flow); return uart_set_options(port, co, baud, parity, bits, flow); } @@ -1969,7 +1955,7 @@ static int __init serial8250_init(void) { int ret, i; - printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.80 $ " + printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.84 $ " "IRQ sharing %sabled\n", share_irqs ? "en" : "dis"); for (i = 0; i < NR_IRQS; i++) @@ -2001,7 +1987,7 @@ EXPORT_SYMBOL(unregister_serial); EXPORT_SYMBOL(serial8250_get_irq_map); MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Generic 8250/16x50 serial driver $Revision: 1.80 $"); +MODULE_DESCRIPTION("Generic 8250/16x50 serial driver $Revision: 1.84 $"); MODULE_PARM(share_irqs, "i"); MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices" diff --git a/drivers/serial/serial_8250.h b/drivers/serial/8250.h index 1002d1d3d693..e0935d1a2447 100644 --- a/drivers/serial/serial_8250.h +++ b/drivers/serial/8250.h @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_8250.h + * linux/drivers/char/8250.h * * Driver for 8250/16550-type serial ports * @@ -12,7 +12,7 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * $Id: serial_8250.h,v 1.7 2002/07/06 16:24:46 rmk Exp $ + * $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $ */ #include <linux/config.h> diff --git a/drivers/serial/serial_8250_cs.c b/drivers/serial/8250_cs.c index 216612335008..216612335008 100644 --- a/drivers/serial/serial_8250_cs.c +++ b/drivers/serial/8250_cs.c diff --git a/drivers/serial/serial_8250_pci.c b/drivers/serial/8250_pci.c index 5b20507bbbc8..ef925d32febe 100644 --- a/drivers/serial/serial_8250_pci.c +++ b/drivers/serial/8250_pci.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_8250_pci.c + * linux/drivers/char/8250_pci.c * * Probe module for 8250/16550-type PCI serial ports. * @@ -11,7 +11,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. * - * $Id: serial_8250_pci.c,v 1.18 2002/03/10 22:32:08 rmk Exp $ + * $Id: 8250_pci.c,v 1.19 2002/07/21 21:32:30 rmk Exp $ */ #include <linux/module.h> #include <linux/init.h> @@ -31,7 +31,7 @@ #include <asm/byteorder.h> #include <asm/serial.h> -#include "serial_8250.h" +#include "8250.h" #ifndef IS_PCI_REGION_IOPORT diff --git a/drivers/serial/serial_8250_pnp.c b/drivers/serial/8250_pnp.c index 37159599913f..84fba5900e59 100644 --- a/drivers/serial/serial_8250_pnp.c +++ b/drivers/serial/8250_pnp.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_8250_pnp.c + * linux/drivers/char/8250_pnp.c * * Probe module for 8250/16550-type ISAPNP serial ports. * @@ -11,7 +11,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. * - * $Id: serial_8250_pnp.c,v 1.9 2002/02/18 19:20:29 rmk Exp $ + * $Id: 8250_pnp.c,v 1.10 2002/07/21 21:32:30 rmk Exp $ */ #include <linux/module.h> #include <linux/init.h> @@ -26,7 +26,7 @@ #include <asm/byteorder.h> #include <asm/serial.h> -#include "serial_8250.h" +#include "8250.h" struct pnpbios_device_id { diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 613e9d9b7cef..4bcdc284ab7c 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -1,22 +1,22 @@ # # Makefile for the kernel serial device drivers. # -# $Id: Makefile,v 1.7 2002/07/06 17:16:24 rmk Exp $ +# $Id: Makefile,v 1.8 2002/07/21 21:32:30 rmk Exp $ # -export-objs := serial_core.o serial_8250.o +export-objs := core.o 8250.o serial-8250-y := -serial-8250-$(CONFIG_PCI) += serial_8250_pci.o -serial-8250-$(CONFIG_ISAPNP) += serial_8250_pnp.o -obj-$(CONFIG_SERIAL_CORE) += serial_core.o -obj-$(CONFIG_SERIAL_21285) += serial_21285.o -obj-$(CONFIG_SERIAL_8250) += serial_8250.o $(serial-8250-y) -obj-$(CONFIG_SERIAL_8250_CS) += serial_8250_cs.o -obj-$(CONFIG_SERIAL_ANAKIN) += serial_anakin.o -obj-$(CONFIG_SERIAL_AMBA) += serial_amba.o -obj-$(CONFIG_SERIAL_CLPS711X) += serial_clps711x.o -obj-$(CONFIG_SERIAL_SA1100) += serial_sa1100.o -obj-$(CONFIG_SERIAL_UART00) += serial_uart00.o +serial-8250-$(CONFIG_PCI) += 8250_pci.o +serial-8250-$(CONFIG_ISAPNP) += 8250_pnp.o +obj-$(CONFIG_SERIAL_CORE) += core.o +obj-$(CONFIG_SERIAL_21285) += 21285.o +obj-$(CONFIG_SERIAL_8250) += 8250.o $(serial-8250-y) +obj-$(CONFIG_SERIAL_8250_CS) += 8250_cs.o +obj-$(CONFIG_SERIAL_ANAKIN) += anakin.o +obj-$(CONFIG_SERIAL_AMBA) += amba.o +obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o +obj-$(CONFIG_SERIAL_SA1100) += sa1100.o +obj-$(CONFIG_SERIAL_UART00) += uart00.o include $(TOPDIR)/Rules.make diff --git a/drivers/serial/serial_amba.c b/drivers/serial/amba.c index 016f717c7242..c5d3157db265 100644 --- a/drivers/serial/serial_amba.c +++ b/drivers/serial/amba.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_amba.c + * linux/drivers/char/amba.c * * Driver for AMBA serial ports * @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: serial_amba.c,v 1.35 2002/07/21 08:57:55 rmk Exp $ + * $Id: amba.c,v 1.37 2002/07/22 15:27:32 rmk Exp $ * * This is a generic driver for ARM AMBA-type serial ports. They * have a lot of 16550-like features, but are not register compatable. @@ -118,7 +118,7 @@ struct uart_amba_port { unsigned int old_status; }; -static void __ambauart_stop_tx(struct uart_port *port) +static void ambauart_stop_tx(struct uart_port *port, unsigned int tty_stop) { unsigned int cr; @@ -127,15 +127,6 @@ static void __ambauart_stop_tx(struct uart_port *port) UART_PUT_CR(port, cr); } -static void ambauart_stop_tx(struct uart_port *port, unsigned int tty_stop) -{ - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - __ambauart_stop_tx(port); - spin_unlock_irqrestore(&port->lock, flags); -} - static void ambauart_start_tx(struct uart_port *port, unsigned int tty_start) { unsigned int cr; @@ -261,7 +252,7 @@ static void ambauart_tx_chars(struct uart_port *port) return; } if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { - __ambauart_stop_tx(port); + ambauart_stop_tx(port); return; } @@ -278,7 +269,7 @@ static void ambauart_tx_chars(struct uart_port *port) uart_event(port, EVT_WRITE_WAKEUP); if (uart_circ_empty(xmit)) - __ambauart_stop_tx(port); + ambauart_stop_tx(port); } static void ambauart_modem_status(struct uart_port *port) @@ -751,7 +742,7 @@ static int __init ambauart_init(void) { int ret; - printk(KERN_INFO "Serial: AMBA driver $Revision: 1.35 $\n"); + printk(KERN_INFO "Serial: AMBA driver $Revision: 1.37 $\n"); ret = uart_register_driver(&amba_reg); if (ret == 0) { @@ -779,5 +770,5 @@ module_exit(ambauart_exit); EXPORT_NO_SYMBOLS; MODULE_AUTHOR("ARM Ltd/Deep Blue Solutions Ltd"); -MODULE_DESCRIPTION("ARM AMBA serial port driver $Revision: 1.35 $"); +MODULE_DESCRIPTION("ARM AMBA serial port driver $Revision: 1.37 $"); MODULE_LICENSE("GPL"); diff --git a/drivers/serial/serial_anakin.c b/drivers/serial/anakin.c index f9ee4c2bb2a4..f01e383a2624 100644 --- a/drivers/serial/serial_anakin.c +++ b/drivers/serial/anakin.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_anakin.c + * linux/drivers/char/anakin.c * * Based on driver for AMBA serial ports, by ARM Limited, * Deep Blue Solutions Ltd., Linus Torvalds and Theodore Ts'o. @@ -19,7 +19,7 @@ * SA_INTERRUPT. Works reliably now. No longer requires * changes to the serial_core API. * - * $Id: serial_anakin.c,v 1.27 2002/07/20 17:10:03 rmk Exp $ + * $Id: anakin.c,v 1.29 2002/07/22 15:27:32 rmk Exp $ */ #include <linux/config.h> @@ -106,10 +106,6 @@ anakin_transmit_x_char(struct uart_port *port) static void anakin_start_tx(struct uart_port *port, unsigned int tty_start) { - unsigned int flags; - - spin_lock_irqsave(&port->lock, flags); - // is it this... or below if (!txenable[port->irq]) { txenable[port->irq] = TXENABLE; @@ -118,8 +114,6 @@ anakin_start_tx(struct uart_port *port, unsigned int tty_start) anakin_transmit_buffer(port); } } - - spin_unlock_irqrestore(&port->lock, flags); } static void @@ -524,7 +518,7 @@ anakin_init(void) { int ret; - printk(KERN_INFO "Serial: Anakin driver $Revision: 1.27 $\n"); + printk(KERN_INFO "Serial: Anakin driver $Revision: 1.29 $\n"); ret = uart_register_driver(&anakin_reg); if (ret == 0) { diff --git a/drivers/serial/serial_clps711x.c b/drivers/serial/clps711x.c index 500b9a2b9f51..bc79f73a6a16 100644 --- a/drivers/serial/serial_clps711x.c +++ b/drivers/serial/clps711x.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_clps711x.c + * linux/drivers/char/clps711x.c * * Driver for CLPS711x serial ports * @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: serial_clps711x.c,v 1.38 2002/07/21 08:57:55 rmk Exp $ + * $Id: clps711x.c,v 1.40 2002/07/22 15:27:32 rmk Exp $ * */ #include <linux/config.h> @@ -95,7 +95,7 @@ #define tx_enabled(port) ((port)->unused[0]) static void -__clps711xuart_stop_tx(struct uart_port *port) +clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop) { if (tx_enabled(port)) { disable_irq(TX_IRQ(port)); @@ -104,26 +104,12 @@ __clps711xuart_stop_tx(struct uart_port *port) } static void -clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop) -{ - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); - __clps711xuart_stop_tx(port); - spin_unlock_irqrestore(&port->lock, flags); -} - -static void clps711xuart_start_tx(struct uart_port *port, unsigned int tty_start) { - unsigned long flags; - - spin_lock_irqsave(&port->lock, flags); if (!tx_enabled(port)) { enable_irq(TX_IRQ(port)); tx_enabled(port) = 1; } - spin_unlock_irqrestore(&port->lock, flags); } static void clps711xuart_stop_rx(struct uart_port *port) @@ -224,7 +210,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) return; } if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { - __clps711xuart_stop_tx(port); + clps711xuart_stop_tx(port); return; } @@ -241,7 +227,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) uart_event(port, EVT_WRITE_WAKEUP); if (uart_circ_empty(xmit)) - __clps711xuart_stop_tx(port); + clps711xuart_stop_tx(port); } static unsigned int clps711xuart_tx_empty(struct uart_port *port) @@ -611,7 +597,7 @@ static int __init clps711xuart_init(void) { int ret, i; - printk(KERN_INFO "Serial: CLPS711x driver $Revision: 1.38 $\n"); + printk(KERN_INFO "Serial: CLPS711x driver $Revision: 1.40 $\n"); ret = uart_register_driver(&clps711x_reg); if (ret) @@ -639,5 +625,5 @@ module_exit(clps711xuart_exit); EXPORT_NO_SYMBOLS; MODULE_AUTHOR("Deep Blue Solutions Ltd"); -MODULE_DESCRIPTION("CLPS-711x generic serial driver $Revision: 1.38 $"); +MODULE_DESCRIPTION("CLPS-711x generic serial driver $Revision: 1.40 $"); MODULE_LICENSE("GPL"); diff --git a/drivers/serial/serial_core.c b/drivers/serial/core.c index c6d354329e02..026b54b191d6 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/core.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_core.c + * linux/drivers/char/core.c * * Driver core for serial ports * @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: serial_core.c,v 1.89 2002/07/20 18:07:32 rmk Exp $ + * $Id: core.c,v 1.91 2002/07/22 15:27:32 rmk Exp $ * */ #include <linux/config.h> @@ -93,8 +93,11 @@ static void uart_stop(struct tty_struct *tty) { struct uart_info *info = tty->driver_data; struct uart_port *port = info->port; + unsigned long flags; + spin_lock_irqsave(&port->lock, flags); port->ops->stop_tx(port, 1); + spin_unlock_irqrestore(&port->lock, flags); } static void __uart_start(struct tty_struct *tty) @@ -554,13 +557,17 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) { struct uart_info *info = tty->driver_data; struct uart_port *port = info->port; + unsigned long flags; if (port->ops->send_xchar) port->ops->send_xchar(port, ch); else { port->x_char = ch; - if (ch) + if (ch) { + spin_lock_irqsave(&port->lock, flags); port->ops->start_tx(port, 0); + spin_unlock_irqrestore(&port->lock, flags); + } } } @@ -1935,8 +1942,8 @@ static int uart_pm_set_state(struct uart_state *state, int pm_state, int oldstat port->cons->flags &= ~CON_ENABLED; if (running) { - ops->stop_tx(port, 0); spin_lock_irq(&port->lock); + ops->stop_tx(port, 0); ops->set_mctrl(port, 0); spin_unlock_irq(&port->lock); ops->stop_rx(port); diff --git a/drivers/serial/serial_sa1100.c b/drivers/serial/sa1100.c index 0f578fcdd757..b10ad6329dbe 100644 --- a/drivers/serial/serial_sa1100.c +++ b/drivers/serial/sa1100.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_sa1100.c + * linux/drivers/char/sa1100.c * * Driver for SA11x0 serial ports * @@ -21,7 +21,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: serial_sa1100.c,v 1.41 2002/07/21 08:57:55 rmk Exp $ + * $Id: sa1100.c,v 1.43 2002/07/22 15:27:32 rmk Exp $ * */ #include <linux/config.h> @@ -155,26 +155,17 @@ static void sa1100_timeout(unsigned long data) } } -static void __sa1100_stop_tx(struct sa1100_port *sport) -{ - u32 utcr3; - - utcr3 = UART_GET_UTCR3(sport); - UART_PUT_UTCR3(sport, utcr3 & ~UTCR3_TIE); - sport->port.read_status_mask &= ~UTSR0_TO_SM(UTSR0_TFS); -} - /* * interrupts disabled on entry */ static void sa1100_stop_tx(struct uart_port *port, unsigned int tty_stop) { struct sa1100_port *sport = (struct sa1100_port *)port; - unsigned long flags; + u32 utcr3; - spin_lock_irqsave(&sport->port.lock, flags); - __sa1100_stop_tx(sport); - spin_unlock_irqrestore(&sport->port.lock, flags); + utcr3 = UART_GET_UTCR3(sport); + UART_PUT_UTCR3(sport, utcr3 & ~UTCR3_TIE); + sport->port.read_status_mask &= ~UTSR0_TO_SM(UTSR0_TFS); } /* @@ -315,7 +306,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport) sa1100_mctrl_check(sport); if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { - __sa1100_stop_tx(sport); + sa1100_stop_tx(&sport->port, 0); return; } @@ -335,7 +326,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport) uart_event(&sport->port, EVT_WRITE_WAKEUP); if (uart_circ_empty(xmit)) - __sa1100_stop_tx(sport); + sa1100_stop_tx(&sport->port, 0); } static void sa1100_int(int irq, void *dev_id, struct pt_regs *regs) @@ -866,7 +857,7 @@ static int __init sa1100_serial_init(void) { int ret; - printk(KERN_INFO "Serial: SA11x0 driver $Revision: 1.41 $\n"); + printk(KERN_INFO "Serial: SA11x0 driver $Revision: 1.43 $\n"); sa1100_init_ports(); ret = uart_register_driver(&sa1100_reg); @@ -895,5 +886,5 @@ module_exit(sa1100_serial_exit); EXPORT_NO_SYMBOLS; MODULE_AUTHOR("Deep Blue Solutions Ltd"); -MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.41 $"); +MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.43 $"); MODULE_LICENSE("GPL"); diff --git a/drivers/serial/serial_uart00.c b/drivers/serial/uart00.c index e90c36f6ac97..41f09f633e55 100644 --- a/drivers/serial/serial_uart00.c +++ b/drivers/serial/uart00.c @@ -1,5 +1,5 @@ /* - * linux/drivers/char/serial_uart00.c + * linux/drivers/char/uart00.c * * Driver for UART00 serial ports * @@ -21,7 +21,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: serial_uart00.c,v 1.32 2002/07/20 17:10:04 rmk Exp $ + * $Id: uart00.c,v 1.33 2002/07/21 21:32:31 rmk Exp $ * */ #include <linux/config.h> @@ -755,7 +755,7 @@ static int __init uart00_init(void) { int result; - printk(KERN_INFO "Serial: UART00 driver $Revision: 1.32 $\n"); + printk(KERN_INFO "Serial: UART00 driver $Revision: 1.33 $\n"); printk(KERN_WARNING "serial_uart00:Using temporary major/minor pairs" " - these WILL change in the future\n"); |
