Commit d4ea8ebe authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://bk.arm.linux.org.uk:14691

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 82e6c293 1c36ac5d
...@@ -3,7 +3,7 @@ ...@@ -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 This document is meant as a brief overview of some aspects of the new serial
...@@ -119,7 +119,7 @@ hardware. ...@@ -119,7 +119,7 @@ hardware.
tty_stop: 1 if this call is due to the TTY layer issuing a tty_stop: 1 if this call is due to the TTY layer issuing a
TTY stop to the driver (equiv to rs_stop). TTY stop to the driver (equiv to rs_stop).
Locking: none. Locking: port->lock taken.
Interrupts: caller dependent. Interrupts: caller dependent.
This call must not sleep This call must not sleep
......
/* /*
* linux/drivers/char/serial_21285.c * linux/drivers/char/21285.c
* *
* Driver for the serial port on the 21285 StrongArm-110 core logic chip. * Driver for the serial port on the 21285 StrongArm-110 core logic chip.
* *
* Based on drivers/char/serial.c * 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/config.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -65,7 +65,8 @@ static const char serial21285_name[] = "Footbridge UART"; ...@@ -65,7 +65,8 @@ static const char serial21285_name[] = "Footbridge UART";
* int((BAUD_BASE - (baud >> 1)) / baud) * 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)) { if (tx_enabled(port)) {
disable_irq(IRQ_CONTX); disable_irq(IRQ_CONTX);
...@@ -73,27 +74,13 @@ static void __serial21285_stop_tx(struct uart_port *port) ...@@ -73,27 +74,13 @@ 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 static void
serial21285_start_tx(struct uart_port *port, unsigned int tty_start) serial21285_start_tx(struct uart_port *port, unsigned int tty_start)
{ {
unsigned long flags;
spin_lock_irqsave(&port->lock, flags);
if (!tx_enabled(port)) { if (!tx_enabled(port)) {
enable_irq(IRQ_CONTX); enable_irq(IRQ_CONTX);
tx_enabled(port) = 1; tx_enabled(port) = 1;
} }
spin_unlock_irqrestore(&port->lock, flags);
} }
static void serial21285_stop_rx(struct uart_port *port) 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) ...@@ -185,7 +172,7 @@ static void serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs)
return; return;
} }
if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
__serial21285_stop_tx(port); serial21285_stop_tx(port, 0);
return; return;
} }
...@@ -201,7 +188,7 @@ static void serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs) ...@@ -201,7 +188,7 @@ static void serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs)
uart_event(port, EVT_WRITE_WAKEUP); uart_event(port, EVT_WRITE_WAKEUP);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
__serial21285_stop_tx(port); serial21285_stop_tx(port, 0);
} }
static unsigned int serial21285_tx_empty(struct uart_port *port) static unsigned int serial21285_tx_empty(struct uart_port *port)
...@@ -527,7 +514,7 @@ static int __init serial21285_init(void) ...@@ -527,7 +514,7 @@ static int __init serial21285_init(void)
{ {
int ret; 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(); serial21285_setup_ports();
...@@ -550,4 +537,4 @@ module_exit(serial21285_exit); ...@@ -550,4 +537,4 @@ module_exit(serial21285_exit);
EXPORT_NO_SYMBOLS; EXPORT_NO_SYMBOLS;
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver $Revision: 1.32 $"); MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver $Revision: 1.34 $");
/* /*
* linux/drivers/char/serial_8250.c * linux/drivers/char/8250.c
* *
* Driver for 8250/16550-type serial ports * Driver for 8250/16550-type serial ports
* *
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (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 * A note about mapbase / membase
* *
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#endif #endif
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include "serial_8250.h" #include "8250.h"
/* /*
* Configuration: * Configuration:
...@@ -690,7 +690,7 @@ static void autoconfig_irq(struct uart_8250_port *up) ...@@ -690,7 +690,7 @@ static void autoconfig_irq(struct uart_8250_port *up)
up->port.irq = (irq > 0) ? irq : 0; 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; 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) ...@@ -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) static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start)
{ {
struct uart_8250_port *up = (struct uart_8250_port *)port; struct uart_8250_port *up = (struct uart_8250_port *)port;
...@@ -852,7 +842,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) ...@@ -852,7 +842,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
return; return;
} }
if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
__serial8250_stop_tx(&up->port, 0); serial8250_stop_tx(&up->port, 0);
return; return;
} }
...@@ -871,7 +861,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up) ...@@ -871,7 +861,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
DEBUG_INTR("THRE..."); DEBUG_INTR("THRE...");
if (uart_circ_empty(xmit)) 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) 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, ...@@ -1296,8 +1286,6 @@ serial8250_change_speed(struct uart_port *port, unsigned int cflag,
unsigned char cval, fcr = 0; unsigned char cval, fcr = 0;
unsigned long flags; unsigned long flags;
printk("+++ change_speed port %p cflag %08x quot %d\n", port, cflag, quot);
switch (cflag & CSIZE) { switch (cflag & CSIZE) {
case CS5: case CS5:
cval = 0x00; cval = 0x00;
...@@ -1835,7 +1823,6 @@ static int __init serial8250_console_setup(struct console *co, char *options) ...@@ -1835,7 +1823,6 @@ static int __init serial8250_console_setup(struct console *co, char *options)
if (co->index >= UART_NR) if (co->index >= UART_NR)
co->index = 0; co->index = 0;
port = &serial8250_ports[co->index].port; port = &serial8250_ports[co->index].port;
printk("+++ index %d port %p iobase %x\n", co->index, port, port->iobase);
/* /*
* Temporary fix. * Temporary fix.
...@@ -1844,7 +1831,6 @@ static int __init serial8250_console_setup(struct console *co, char *options) ...@@ -1844,7 +1831,6 @@ static int __init serial8250_console_setup(struct console *co, char *options)
if (options) if (options)
uart_parse_options(options, &baud, &parity, &bits, &flow); 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); return uart_set_options(port, co, baud, parity, bits, flow);
} }
...@@ -1969,7 +1955,7 @@ static int __init serial8250_init(void) ...@@ -1969,7 +1955,7 @@ static int __init serial8250_init(void)
{ {
int ret, i; 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"); "IRQ sharing %sabled\n", share_irqs ? "en" : "dis");
for (i = 0; i < NR_IRQS; i++) for (i = 0; i < NR_IRQS; i++)
...@@ -2001,7 +1987,7 @@ EXPORT_SYMBOL(unregister_serial); ...@@ -2001,7 +1987,7 @@ EXPORT_SYMBOL(unregister_serial);
EXPORT_SYMBOL(serial8250_get_irq_map); EXPORT_SYMBOL(serial8250_get_irq_map);
MODULE_LICENSE("GPL"); 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(share_irqs, "i");
MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices" MODULE_PARM_DESC(share_irqs, "Share IRQs with other non-8250/16x50 devices"
......
/* /*
* linux/drivers/char/serial_8250.h * linux/drivers/char/8250.h
* *
* Driver for 8250/16550-type serial ports * Driver for 8250/16550-type serial ports
* *
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (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> #include <linux/config.h>
......
/* /*
* linux/drivers/char/serial_8250_pci.c * linux/drivers/char/8250_pci.c
* *
* Probe module for 8250/16550-type PCI serial ports. * Probe module for 8250/16550-type PCI serial ports.
* *
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License. * 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/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/serial.h> #include <asm/serial.h>
#include "serial_8250.h" #include "8250.h"
#ifndef IS_PCI_REGION_IOPORT #ifndef IS_PCI_REGION_IOPORT
......
/* /*
* linux/drivers/char/serial_8250_pnp.c * linux/drivers/char/8250_pnp.c
* *
* Probe module for 8250/16550-type ISAPNP serial ports. * Probe module for 8250/16550-type ISAPNP serial ports.
* *
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License. * 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/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/serial.h> #include <asm/serial.h>
#include "serial_8250.h" #include "8250.h"
struct pnpbios_device_id struct pnpbios_device_id
{ {
......
# #
# Makefile for the kernel serial device drivers. # 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-y :=
serial-8250-$(CONFIG_PCI) += serial_8250_pci.o serial-8250-$(CONFIG_PCI) += 8250_pci.o
serial-8250-$(CONFIG_ISAPNP) += serial_8250_pnp.o serial-8250-$(CONFIG_ISAPNP) += 8250_pnp.o
obj-$(CONFIG_SERIAL_CORE) += serial_core.o obj-$(CONFIG_SERIAL_CORE) += core.o
obj-$(CONFIG_SERIAL_21285) += serial_21285.o obj-$(CONFIG_SERIAL_21285) += 21285.o
obj-$(CONFIG_SERIAL_8250) += serial_8250.o $(serial-8250-y) obj-$(CONFIG_SERIAL_8250) += 8250.o $(serial-8250-y)
obj-$(CONFIG_SERIAL_8250_CS) += serial_8250_cs.o obj-$(CONFIG_SERIAL_8250_CS) += 8250_cs.o
obj-$(CONFIG_SERIAL_ANAKIN) += serial_anakin.o obj-$(CONFIG_SERIAL_ANAKIN) += anakin.o
obj-$(CONFIG_SERIAL_AMBA) += serial_amba.o obj-$(CONFIG_SERIAL_AMBA) += amba.o
obj-$(CONFIG_SERIAL_CLPS711X) += serial_clps711x.o obj-$(CONFIG_SERIAL_CLPS711X) += clps711x.o
obj-$(CONFIG_SERIAL_SA1100) += serial_sa1100.o obj-$(CONFIG_SERIAL_SA1100) += sa1100.o
obj-$(CONFIG_SERIAL_UART00) += serial_uart00.o obj-$(CONFIG_SERIAL_UART00) += uart00.o
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
/* /*
* linux/drivers/char/serial_amba.c * linux/drivers/char/amba.c
* *
* Driver for AMBA serial ports * Driver for AMBA serial ports
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 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 * This is a generic driver for ARM AMBA-type serial ports. They
* have a lot of 16550-like features, but are not register compatable. * have a lot of 16550-like features, but are not register compatable.
...@@ -118,7 +118,7 @@ struct uart_amba_port { ...@@ -118,7 +118,7 @@ struct uart_amba_port {
unsigned int old_status; 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; unsigned int cr;
...@@ -127,15 +127,6 @@ static void __ambauart_stop_tx(struct uart_port *port) ...@@ -127,15 +127,6 @@ static void __ambauart_stop_tx(struct uart_port *port)
UART_PUT_CR(port, cr); 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) static void ambauart_start_tx(struct uart_port *port, unsigned int tty_start)
{ {
unsigned int cr; unsigned int cr;
...@@ -261,7 +252,7 @@ static void ambauart_tx_chars(struct uart_port *port) ...@@ -261,7 +252,7 @@ static void ambauart_tx_chars(struct uart_port *port)
return; return;
} }
if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
__ambauart_stop_tx(port); ambauart_stop_tx(port);
return; return;
} }
...@@ -278,7 +269,7 @@ static void ambauart_tx_chars(struct uart_port *port) ...@@ -278,7 +269,7 @@ static void ambauart_tx_chars(struct uart_port *port)
uart_event(port, EVT_WRITE_WAKEUP); uart_event(port, EVT_WRITE_WAKEUP);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
__ambauart_stop_tx(port); ambauart_stop_tx(port);
} }
static void ambauart_modem_status(struct uart_port *port) static void ambauart_modem_status(struct uart_port *port)
...@@ -751,7 +742,7 @@ static int __init ambauart_init(void) ...@@ -751,7 +742,7 @@ static int __init ambauart_init(void)
{ {
int ret; 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); ret = uart_register_driver(&amba_reg);
if (ret == 0) { if (ret == 0) {
...@@ -779,5 +770,5 @@ module_exit(ambauart_exit); ...@@ -779,5 +770,5 @@ module_exit(ambauart_exit);
EXPORT_NO_SYMBOLS; EXPORT_NO_SYMBOLS;
MODULE_AUTHOR("ARM Ltd/Deep Blue Solutions Ltd"); 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"); MODULE_LICENSE("GPL");
/* /*
* linux/drivers/char/serial_anakin.c * linux/drivers/char/anakin.c
* *
* Based on driver for AMBA serial ports, by ARM Limited, * Based on driver for AMBA serial ports, by ARM Limited,
* Deep Blue Solutions Ltd., Linus Torvalds and Theodore Ts'o. * Deep Blue Solutions Ltd., Linus Torvalds and Theodore Ts'o.
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* SA_INTERRUPT. Works reliably now. No longer requires * SA_INTERRUPT. Works reliably now. No longer requires
* changes to the serial_core API. * 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> #include <linux/config.h>
...@@ -106,10 +106,6 @@ anakin_transmit_x_char(struct uart_port *port) ...@@ -106,10 +106,6 @@ anakin_transmit_x_char(struct uart_port *port)
static void static void
anakin_start_tx(struct uart_port *port, unsigned int tty_start) 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 // is it this... or below
if (!txenable[port->irq]) { if (!txenable[port->irq]) {
txenable[port->irq] = TXENABLE; txenable[port->irq] = TXENABLE;
...@@ -118,8 +114,6 @@ anakin_start_tx(struct uart_port *port, unsigned int tty_start) ...@@ -118,8 +114,6 @@ anakin_start_tx(struct uart_port *port, unsigned int tty_start)
anakin_transmit_buffer(port); anakin_transmit_buffer(port);
} }
} }
spin_unlock_irqrestore(&port->lock, flags);
} }
static void static void
...@@ -524,7 +518,7 @@ anakin_init(void) ...@@ -524,7 +518,7 @@ anakin_init(void)
{ {
int ret; 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); ret = uart_register_driver(&anakin_reg);
if (ret == 0) { if (ret == 0) {
......
/* /*
* linux/drivers/char/serial_clps711x.c * linux/drivers/char/clps711x.c
* *
* Driver for CLPS711x serial ports * Driver for CLPS711x serial ports
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 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> #include <linux/config.h>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
#define tx_enabled(port) ((port)->unused[0]) #define tx_enabled(port) ((port)->unused[0])
static void static void
__clps711xuart_stop_tx(struct uart_port *port) clps711xuart_stop_tx(struct uart_port *port, unsigned int tty_stop)
{ {
if (tx_enabled(port)) { if (tx_enabled(port)) {
disable_irq(TX_IRQ(port)); disable_irq(TX_IRQ(port));
...@@ -103,27 +103,13 @@ __clps711xuart_stop_tx(struct uart_port *port) ...@@ -103,27 +103,13 @@ __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 static void
clps711xuart_start_tx(struct uart_port *port, unsigned int tty_start) clps711xuart_start_tx(struct uart_port *port, unsigned int tty_start)
{ {
unsigned long flags;
spin_lock_irqsave(&port->lock, flags);
if (!tx_enabled(port)) { if (!tx_enabled(port)) {
enable_irq(TX_IRQ(port)); enable_irq(TX_IRQ(port));
tx_enabled(port) = 1; tx_enabled(port) = 1;
} }
spin_unlock_irqrestore(&port->lock, flags);
} }
static void clps711xuart_stop_rx(struct uart_port *port) 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) ...@@ -224,7 +210,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
return; return;
} }
if (uart_circ_empty(xmit) || uart_tx_stopped(port)) { if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
__clps711xuart_stop_tx(port); clps711xuart_stop_tx(port);
return; return;
} }
...@@ -241,7 +227,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) ...@@ -241,7 +227,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
uart_event(port, EVT_WRITE_WAKEUP); uart_event(port, EVT_WRITE_WAKEUP);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
__clps711xuart_stop_tx(port); clps711xuart_stop_tx(port);
} }
static unsigned int clps711xuart_tx_empty(struct uart_port *port) static unsigned int clps711xuart_tx_empty(struct uart_port *port)
...@@ -611,7 +597,7 @@ static int __init clps711xuart_init(void) ...@@ -611,7 +597,7 @@ static int __init clps711xuart_init(void)
{ {
int ret, i; 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); ret = uart_register_driver(&clps711x_reg);
if (ret) if (ret)
...@@ -639,5 +625,5 @@ module_exit(clps711xuart_exit); ...@@ -639,5 +625,5 @@ module_exit(clps711xuart_exit);
EXPORT_NO_SYMBOLS; EXPORT_NO_SYMBOLS;
MODULE_AUTHOR("Deep Blue Solutions Ltd"); 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"); MODULE_LICENSE("GPL");
/* /*
* linux/drivers/char/serial_core.c * linux/drivers/char/core.c
* *
* Driver core for serial ports * Driver core for serial ports
* *
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 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> #include <linux/config.h>
...@@ -93,8 +93,11 @@ static void uart_stop(struct tty_struct *tty) ...@@ -93,8 +93,11 @@ static void uart_stop(struct tty_struct *tty)
{ {
struct uart_info *info = tty->driver_data; struct uart_info *info = tty->driver_data;
struct uart_port *port = info->port; struct uart_port *port = info->port;
unsigned long flags;
spin_lock_irqsave(&port->lock, flags);
port->ops->stop_tx(port, 1); port->ops->stop_tx(port, 1);
spin_unlock_irqrestore(&port->lock, flags);
} }
static void __uart_start(struct tty_struct *tty) static void __uart_start(struct tty_struct *tty)
...@@ -554,13 +557,17 @@ static void uart_send_xchar(struct tty_struct *tty, char ch) ...@@ -554,13 +557,17 @@ static void uart_send_xchar(struct tty_struct *tty, char ch)
{ {
struct uart_info *info = tty->driver_data; struct uart_info *info = tty->driver_data;
struct uart_port *port = info->port; struct uart_port *port = info->port;
unsigned long flags;
if (port->ops->send_xchar) if (port->ops->send_xchar)
port->ops->send_xchar(port, ch); port->ops->send_xchar(port, ch);
else { else {
port->x_char = ch; port->x_char = ch;
if (ch) if (ch) {
spin_lock_irqsave(&port->lock, flags);
port->ops->start_tx(port, 0); 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 ...@@ -1935,8 +1942,8 @@ static int uart_pm_set_state(struct uart_state *state, int pm_state, int oldstat
port->cons->flags &= ~CON_ENABLED; port->cons->flags &= ~CON_ENABLED;
if (running) { if (running) {
ops->stop_tx(port, 0);
spin_lock_irq(&port->lock); spin_lock_irq(&port->lock);
ops->stop_tx(port, 0);
ops->set_mctrl(port, 0); ops->set_mctrl(port, 0);
spin_unlock_irq(&port->lock); spin_unlock_irq(&port->lock);
ops->stop_rx(port); ops->stop_rx(port);
......
/* /*
* linux/drivers/char/serial_sa1100.c * linux/drivers/char/sa1100.c
* *
* Driver for SA11x0 serial ports * Driver for SA11x0 serial ports
* *
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 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> #include <linux/config.h>
...@@ -155,26 +155,17 @@ static void sa1100_timeout(unsigned long data) ...@@ -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 * interrupts disabled on entry
*/ */
static void sa1100_stop_tx(struct uart_port *port, unsigned int tty_stop) static void sa1100_stop_tx(struct uart_port *port, unsigned int tty_stop)
{ {
struct sa1100_port *sport = (struct sa1100_port *)port; struct sa1100_port *sport = (struct sa1100_port *)port;
unsigned long flags; u32 utcr3;
spin_lock_irqsave(&sport->port.lock, flags); utcr3 = UART_GET_UTCR3(sport);
__sa1100_stop_tx(sport); UART_PUT_UTCR3(sport, utcr3 & ~UTCR3_TIE);
spin_unlock_irqrestore(&sport->port.lock, flags); sport->port.read_status_mask &= ~UTSR0_TO_SM(UTSR0_TFS);
} }
/* /*
...@@ -315,7 +306,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport) ...@@ -315,7 +306,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport)
sa1100_mctrl_check(sport); sa1100_mctrl_check(sport);
if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) { if (uart_circ_empty(xmit) || uart_tx_stopped(&sport->port)) {
__sa1100_stop_tx(sport); sa1100_stop_tx(&sport->port, 0);
return; return;
} }
...@@ -335,7 +326,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport) ...@@ -335,7 +326,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport)
uart_event(&sport->port, EVT_WRITE_WAKEUP); uart_event(&sport->port, EVT_WRITE_WAKEUP);
if (uart_circ_empty(xmit)) 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) static void sa1100_int(int irq, void *dev_id, struct pt_regs *regs)
...@@ -866,7 +857,7 @@ static int __init sa1100_serial_init(void) ...@@ -866,7 +857,7 @@ static int __init sa1100_serial_init(void)
{ {
int ret; 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(); sa1100_init_ports();
ret = uart_register_driver(&sa1100_reg); ret = uart_register_driver(&sa1100_reg);
...@@ -895,5 +886,5 @@ module_exit(sa1100_serial_exit); ...@@ -895,5 +886,5 @@ module_exit(sa1100_serial_exit);
EXPORT_NO_SYMBOLS; EXPORT_NO_SYMBOLS;
MODULE_AUTHOR("Deep Blue Solutions Ltd"); 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"); MODULE_LICENSE("GPL");
/* /*
* linux/drivers/char/serial_uart00.c * linux/drivers/char/uart00.c
* *
* Driver for UART00 serial ports * Driver for UART00 serial ports
* *
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 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> #include <linux/config.h>
...@@ -755,7 +755,7 @@ static int __init uart00_init(void) ...@@ -755,7 +755,7 @@ static int __init uart00_init(void)
{ {
int result; 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" printk(KERN_WARNING "serial_uart00:Using temporary major/minor pairs"
" - these WILL change in the future\n"); " - these WILL change in the future\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment