Commit 0cd3455f 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 fd4588d0 29363ba0
...@@ -138,15 +138,16 @@ hardware. ...@@ -138,15 +138,16 @@ hardware.
Stop receiving characters; the port is in the process of Stop receiving characters; the port is in the process of
being closed. being closed.
Locking: none. Locking: port->lock taken.
Interrupts: caller dependent. Interrupts: locally disabled.
This call must not sleep This call must not sleep
enable_ms(port) enable_ms(port)
Enable the modem status interrupts. Enable the modem status interrupts.
Locking: none. Locking: port->lock taken.
Interrupts: caller dependent. Interrupts: locally disabled.
This call must not sleep
break_ctl(port,ctl) break_ctl(port,ctl)
Control the transmission of a break signal. If ctl is Control the transmission of a break signal. If ctl is
......
...@@ -5,29 +5,19 @@ ...@@ -5,29 +5,19 @@
* *
* Based on drivers/char/serial.c * Based on drivers/char/serial.c
* *
* $Id: 21285.c,v 1.34 2002/07/22 15:27:32 rmk Exp $ * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/major.h>
#include <linux/ptrace.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/serial.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/hardware/dec21285.h> #include <asm/hardware/dec21285.h>
#include <asm/hardware.h> #include <asm/hardware.h>
...@@ -85,14 +75,10 @@ serial21285_start_tx(struct uart_port *port, unsigned int tty_start) ...@@ -85,14 +75,10 @@ serial21285_start_tx(struct uart_port *port, unsigned int tty_start)
static void serial21285_stop_rx(struct uart_port *port) static void serial21285_stop_rx(struct uart_port *port)
{ {
unsigned long flags;
spin_lock_irqsave(&port->lock, flags);
if (rx_enabled(port)) { if (rx_enabled(port)) {
disable_irq(IRQ_CONRX); disable_irq(IRQ_CONRX);
rx_enabled(port) = 0; rx_enabled(port) = 0;
} }
spin_unlock_irqrestore(&port->lock, flags);
} }
static void serial21285_enable_ms(struct uart_port *port) static void serial21285_enable_ms(struct uart_port *port)
...@@ -514,7 +500,7 @@ static int __init serial21285_init(void) ...@@ -514,7 +500,7 @@ static int __init serial21285_init(void)
{ {
int ret; int ret;
printk(KERN_INFO "Serial: 21285 driver $Revision: 1.34 $\n"); printk(KERN_INFO "Serial: 21285 driver $Revision: 1.37 $\n");
serial21285_setup_ports(); serial21285_setup_ports();
...@@ -537,4 +523,4 @@ module_exit(serial21285_exit); ...@@ -537,4 +523,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.34 $"); MODULE_DESCRIPTION("Intel Footbridge (21285) serial driver $Revision: 1.37 $");
...@@ -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: 8250.c,v 1.84 2002/07/22 15:27:32 rmk Exp $ * $Id: 8250.c,v 1.90 2002/07/28 10:03:27 rmk Exp $
* *
* A note about mapbase / membase * A note about mapbase / membase
* *
...@@ -25,29 +25,17 @@ ...@@ -25,29 +25,17 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/compiler.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/slab.h>
#include <linux/ptrace.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/serial.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <linux/serialP.h> #include <linux/serialP.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/kmod.h>
#include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
#if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ #define SUPPORT_SYSRQ
...@@ -724,24 +712,18 @@ static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start) ...@@ -724,24 +712,18 @@ static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start)
static void serial8250_stop_rx(struct uart_port *port) static void serial8250_stop_rx(struct uart_port *port)
{ {
struct uart_8250_port *up = (struct uart_8250_port *)port; struct uart_8250_port *up = (struct uart_8250_port *)port;
unsigned long flags;
spin_lock_irqsave(&up->port.lock, flags);
up->ier &= ~UART_IER_RLSI; up->ier &= ~UART_IER_RLSI;
up->port.read_status_mask &= ~UART_LSR_DR; up->port.read_status_mask &= ~UART_LSR_DR;
serial_out(up, UART_IER, up->ier); serial_out(up, UART_IER, up->ier);
spin_unlock_irqrestore(&up->port.lock, flags);
} }
static void serial8250_enable_ms(struct uart_port *port) static void serial8250_enable_ms(struct uart_port *port)
{ {
struct uart_8250_port *up = (struct uart_8250_port *)port; struct uart_8250_port *up = (struct uart_8250_port *)port;
unsigned long flags;
spin_lock_irqsave(&up->port.lock, flags);
up->ier |= UART_IER_MSI; up->ier |= UART_IER_MSI;
serial_out(up, UART_IER, up->ier); serial_out(up, UART_IER, up->ier);
spin_unlock_irqrestore(&up->port.lock, flags);
} }
static _INLINE_ void static _INLINE_ void
...@@ -1363,6 +1345,12 @@ serial8250_change_speed(struct uart_port *port, unsigned int cflag, ...@@ -1363,6 +1345,12 @@ serial8250_change_speed(struct uart_port *port, unsigned int cflag,
if ((cflag & CREAD) == 0) if ((cflag & CREAD) == 0)
up->port.ignore_status_mask |= UART_LSR_DR; up->port.ignore_status_mask |= UART_LSR_DR;
/*
* Ok, we're now changing the port state. Do it with
* interrupts disabled.
*/
spin_lock_irqsave(&up->port.lock, flags);
/* /*
* CTS flow control flag and modem status interrupts * CTS flow control flag and modem status interrupts
*/ */
...@@ -1370,11 +1358,6 @@ serial8250_change_speed(struct uart_port *port, unsigned int cflag, ...@@ -1370,11 +1358,6 @@ serial8250_change_speed(struct uart_port *port, unsigned int cflag,
if (UART_ENABLE_MS(&up->port, cflag)) if (UART_ENABLE_MS(&up->port, cflag))
up->ier |= UART_IER_MSI; up->ier |= UART_IER_MSI;
/*
* Ok, we're now changing the port state. Do it with
* interrupts disabled.
*/
spin_lock_irqsave(&up->port.lock, flags);
serial_out(up, UART_IER, up->ier); serial_out(up, UART_IER, up->ier);
if (uart_config[up->port.type].flags & UART_STARTECH) { if (uart_config[up->port.type].flags & UART_STARTECH) {
...@@ -1956,7 +1939,7 @@ static int __init serial8250_init(void) ...@@ -1956,7 +1939,7 @@ static int __init serial8250_init(void)
{ {
int ret, i; int ret, i;
printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.84 $ " printk(KERN_INFO "Serial: 8250/16550 driver $Revision: 1.90 $ "
"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++)
...@@ -1988,7 +1971,7 @@ EXPORT_SYMBOL(unregister_serial); ...@@ -1988,7 +1971,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.84 $"); MODULE_DESCRIPTION("Generic 8250/16x50 serial driver $Revision: 1.90 $");
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"
......
...@@ -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: 8250_pci.c,v 1.19 2002/07/21 21:32:30 rmk Exp $ * $Id: 8250_pci.c,v 1.24 2002/07/29 14:39:56 rmk Exp $
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <asm/bitops.h> #include <asm/bitops.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <asm/serial.h> #include <asm/serial.h>
#include <asm/io.h>
#include "8250.h" #include "8250.h"
...@@ -137,7 +138,29 @@ get_pci_port(struct pci_dev *dev, struct pci_board *board, ...@@ -137,7 +138,29 @@ get_pci_port(struct pci_dev *dev, struct pci_board *board,
offset = 8 * (idx - 2); offset = 8 * (idx - 2);
} }
} }
/* HP's Diva chip puts the 4th/5th serial port further out, and
* some serial ports are supposed to be hidden on certain models.
*/
if (dev->vendor == PCI_VENDOR_ID_HP &&
dev->device == PCI_DEVICE_ID_HP_DIVA) {
switch (dev->subsystem_device) {
case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
if (idx == 3)
idx++;
break;
case PCI_DEVICE_ID_HP_DIVA_EVEREST:
if (idx > 0)
idx++;
if (idx > 2)
idx++;
break;
}
if (idx > 2) {
offset = 0x18;
}
}
port = pci_resource_start(dev, base_idx) + offset; port = pci_resource_start(dev, base_idx) + offset;
if ((board->flags & SPCI_FL_BASE_TABLE) == 0) if ((board->flags & SPCI_FL_BASE_TABLE) == 0)
...@@ -379,6 +402,41 @@ pci_timedia_fn(struct pci_dev *dev, struct pci_board *board, int enable) ...@@ -379,6 +402,41 @@ pci_timedia_fn(struct pci_dev *dev, struct pci_board *board, int enable)
return 0; return 0;
} }
/*
* HP's Remote Management Console. The Diva chip came in several
* different versions. N-class, L2000 and A500 have two Diva chips, each
* with 3 UARTs (the third UART on the second chip is unused). Superdome
* and Keystone have one Diva chip with 3 UARTs. Some later machines have
* one Diva chip, but it has been expanded to 5 UARTs.
*/
static int __devinit
pci_hp_diva(struct pci_dev *dev, struct pci_board *board, int enable)
{
if (!enable)
return 0;
switch (dev->subsystem_device) {
case PCI_DEVICE_ID_HP_DIVA_TOSCA1:
case PCI_DEVICE_ID_HP_DIVA_HALFDOME:
case PCI_DEVICE_ID_HP_DIVA_KEYSTONE:
case PCI_DEVICE_ID_HP_DIVA_EVEREST:
board->num_ports = 3;
break;
case PCI_DEVICE_ID_HP_DIVA_TOSCA2:
board->num_ports = 2;
break;
case PCI_DEVICE_ID_HP_DIVA_MAESTRO:
board->num_ports = 4;
break;
case PCI_DEVICE_ID_HP_DIVA_POWERBAR:
board->num_ports = 1;
break;
}
return 0;
}
static int __devinit static int __devinit
pci_xircom_fn(struct pci_dev *dev, struct pci_board *board, int enable) pci_xircom_fn(struct pci_dev *dev, struct pci_board *board, int enable)
{ {
...@@ -423,6 +481,7 @@ enum pci_board_num_t { ...@@ -423,6 +481,7 @@ enum pci_board_num_t {
pbn_b1_4_1382400, pbn_b1_4_1382400,
pbn_b1_8_1382400, pbn_b1_8_1382400,
pbn_b2_1_115200,
pbn_b2_8_115200, pbn_b2_8_115200,
pbn_b2_4_460800, pbn_b2_4_460800,
pbn_b2_8_460800, pbn_b2_8_460800,
...@@ -443,6 +502,7 @@ enum pci_board_num_t { ...@@ -443,6 +502,7 @@ enum pci_board_num_t {
pbn_timedia, pbn_timedia,
pbn_intel_i960, pbn_intel_i960,
pbn_sgi_ioc3, pbn_sgi_ioc3,
pbn_hp_diva,
pbn_nec_nile4, pbn_nec_nile4,
pbn_dci_pccom4, pbn_dci_pccom4,
...@@ -501,6 +561,7 @@ static struct pci_board pci_boards[] __devinitdata = { ...@@ -501,6 +561,7 @@ static struct pci_board pci_boards[] __devinitdata = {
{ SPCI_FL_BASE1, 4, 1382400 }, /* pbn_b1_4_1382400 */ { SPCI_FL_BASE1, 4, 1382400 }, /* pbn_b1_4_1382400 */
{ SPCI_FL_BASE1, 8, 1382400 }, /* pbn_b1_8_1382400 */ { SPCI_FL_BASE1, 8, 1382400 }, /* pbn_b1_8_1382400 */
{ SPCI_FL_BASE2, 1, 115200 }, /* pbn_b2_1_115200 */
{ SPCI_FL_BASE2, 8, 115200 }, /* pbn_b2_8_115200 */ { SPCI_FL_BASE2, 8, 115200 }, /* pbn_b2_8_115200 */
{ SPCI_FL_BASE2, 4, 460800 }, /* pbn_b2_4_460800 */ { SPCI_FL_BASE2, 4, 460800 }, /* pbn_b2_4_460800 */
{ SPCI_FL_BASE2, 8, 460800 }, /* pbn_b2_8_460800 */ { SPCI_FL_BASE2, 8, 460800 }, /* pbn_b2_8_460800 */
...@@ -531,6 +592,7 @@ static struct pci_board pci_boards[] __devinitdata = { ...@@ -531,6 +592,7 @@ static struct pci_board pci_boards[] __devinitdata = {
8<<2, 2, pci_inteli960ni_fn, 0x10000}, 8<<2, 2, pci_inteli960ni_fn, 0x10000},
{ SPCI_FL_BASE0 | SPCI_FL_IRQRESOURCE, /* pbn_sgi_ioc3 */ { SPCI_FL_BASE0 | SPCI_FL_IRQRESOURCE, /* pbn_sgi_ioc3 */
1, 458333, 0, 0, 0, 0x20178 }, 1, 458333, 0, 0, 0, 0x20178 },
{ SPCI_FL_BASE0, 5, 115200, 8, 0, pci_hp_diva, 0 },/* pbn_hp_diva */
/* /*
* NEC Vrc-5074 (Nile 4) builtin UART. * NEC Vrc-5074 (Nile 4) builtin UART.
...@@ -636,9 +698,10 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i ...@@ -636,9 +698,10 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i
return rc; return rc;
if (ent->driver_data == pbn_default && if (ent->driver_data == pbn_default &&
serial_pci_guess_board(dev, board)) serial_pci_guess_board(dev, board)) {
pci_disable_device(dev);
return -ENODEV; return -ENODEV;
else if (serial_pci_guess_board(dev, &tmp) == 0) { } else if (serial_pci_guess_board(dev, &tmp) == 0) {
printk(KERN_INFO "Redundant entry in serial pci_table. " printk(KERN_INFO "Redundant entry in serial pci_table. "
"Please send the output of\n" "Please send the output of\n"
"lspci -vv, this message (%d,%d,%d,%d)\n" "lspci -vv, this message (%d,%d,%d,%d)\n"
...@@ -652,8 +715,10 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i ...@@ -652,8 +715,10 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i
priv = kmalloc(sizeof(struct serial_private) + priv = kmalloc(sizeof(struct serial_private) +
sizeof(unsigned int) * board->num_ports, sizeof(unsigned int) * board->num_ports,
GFP_KERNEL); GFP_KERNEL);
if (!priv) if (!priv) {
pci_disable_device(dev);
return -ENOMEM; return -ENOMEM;
}
/* /*
* Run the initialization function, if any * Run the initialization function, if any
...@@ -661,6 +726,7 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i ...@@ -661,6 +726,7 @@ static int __devinit pci_init_one(struct pci_dev *dev, const struct pci_device_i
if (board->init_fn) { if (board->init_fn) {
rc = board->init_fn(dev, board, 1); rc = board->init_fn(dev, board, 1);
if (rc != 0) { if (rc != 0) {
pci_disable_device(dev);
kfree(priv); kfree(priv);
return rc; return rc;
} }
...@@ -1074,6 +1140,14 @@ static struct pci_device_id serial_pci_tbl[] __devinitdata = { ...@@ -1074,6 +1140,14 @@ static struct pci_device_id serial_pci_tbl[] __devinitdata = {
0xFF00, 0, 0, 0, 0xFF00, 0, 0, 0,
pbn_sgi_ioc3 }, pbn_sgi_ioc3 },
/* HP Diva card */
{ PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_hp_diva },
{ PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_DIVA_AUX,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_b2_1_115200 },
/* /*
* NEC Vrc-5074 (Nile 4) builtin UART. * NEC Vrc-5074 (Nile 4) builtin UART.
*/ */
...@@ -1103,14 +1177,6 @@ static struct pci_device_id serial_pci_tbl[] __devinitdata = { ...@@ -1103,14 +1177,6 @@ static struct pci_device_id serial_pci_tbl[] __devinitdata = {
{ 0, } { 0, }
}; };
#ifndef __devexit_p
#if defined(MODULE) || defined(CONFIG_HOTPLUG)
#define __devexit_p(x) x
#else
#define __devexit_p(x) NULL
#endif
#endif
static struct pci_driver serial_pci_driver = { static struct pci_driver serial_pci_driver = {
.name = "serial", .name = "serial",
.probe = pci_init_one, .probe = pci_init_one,
......
...@@ -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: amba.c,v 1.37 2002/07/22 15:27:32 rmk Exp $ * $Id: amba.c,v 1.41 2002/07/28 10:03:27 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.
...@@ -33,30 +33,15 @@ ...@@ -33,30 +33,15 @@
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/circ_buf.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
#if defined(CONFIG_SERIAL_AMBA_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #if defined(CONFIG_SERIAL_AMBA_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ #define SUPPORT_SYSRQ
...@@ -138,26 +123,20 @@ static void ambauart_start_tx(struct uart_port *port, unsigned int tty_start) ...@@ -138,26 +123,20 @@ static void ambauart_start_tx(struct uart_port *port, unsigned int tty_start)
static void ambauart_stop_rx(struct uart_port *port) static void ambauart_stop_rx(struct uart_port *port)
{ {
unsigned long flags;
unsigned int cr; unsigned int cr;
spin_lock_irqsave(&port->lock, flags);
cr = UART_GET_CR(port); cr = UART_GET_CR(port);
cr &= ~(AMBA_UARTCR_RIE | AMBA_UARTCR_RTIE); cr &= ~(AMBA_UARTCR_RIE | AMBA_UARTCR_RTIE);
UART_PUT_CR(port, cr); UART_PUT_CR(port, cr);
spin_unlock_irqrestore(&port->lock, flags);
} }
static void ambauart_enable_ms(struct uart_port *port) static void ambauart_enable_ms(struct uart_port *port)
{ {
unsigned long flags;
unsigned int cr; unsigned int cr;
spin_lock_irqsave(&port->lock, flags);
cr = UART_GET_CR(port); cr = UART_GET_CR(port);
cr |= AMBA_UARTCR_MSIE; cr |= AMBA_UARTCR_MSIE;
UART_PUT_CR(port, cr); UART_PUT_CR(port, cr);
spin_unlock_irqrestore(&port->lock, flags);
} }
static void static void
...@@ -742,7 +721,7 @@ static int __init ambauart_init(void) ...@@ -742,7 +721,7 @@ static int __init ambauart_init(void)
{ {
int ret; int ret;
printk(KERN_INFO "Serial: AMBA driver $Revision: 1.37 $\n"); printk(KERN_INFO "Serial: AMBA driver $Revision: 1.41 $\n");
ret = uart_register_driver(&amba_reg); ret = uart_register_driver(&amba_reg);
if (ret == 0) { if (ret == 0) {
...@@ -770,5 +749,5 @@ module_exit(ambauart_exit); ...@@ -770,5 +749,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.37 $"); MODULE_DESCRIPTION("ARM AMBA serial port driver $Revision: 1.41 $");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -19,35 +19,20 @@ ...@@ -19,35 +19,20 @@
* 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: anakin.c,v 1.29 2002/07/22 15:27:32 rmk Exp $ * $Id: anakin.c,v 1.32 2002/07/28 10:03:27 rmk Exp $
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/circ_buf.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
...@@ -119,13 +104,9 @@ anakin_start_tx(struct uart_port *port, unsigned int tty_start) ...@@ -119,13 +104,9 @@ anakin_start_tx(struct uart_port *port, unsigned int tty_start)
static void static void
anakin_stop_rx(struct uart_port *port) anakin_stop_rx(struct uart_port *port)
{ {
unsigned long flags;
spin_lock_irqsave(&port->lock, flags);
while (anakin_in(port, 0x10) & RXRELEASE) while (anakin_in(port, 0x10) & RXRELEASE)
anakin_in(port, 0x14); anakin_in(port, 0x14);
anakin_out(port, 0x18, anakin_in(port, 0x18) | BLOCKRX); anakin_out(port, 0x18, anakin_in(port, 0x18) | BLOCKRX);
spin_unlock_irqrestore(&port->lock, flags);
} }
static void static void
...@@ -518,7 +499,7 @@ anakin_init(void) ...@@ -518,7 +499,7 @@ anakin_init(void)
{ {
int ret; int ret;
printk(KERN_INFO "Serial: Anakin driver $Revision: 1.29 $\n"); printk(KERN_INFO "Serial: Anakin driver $Revision: 1.32 $\n");
ret = uart_register_driver(&anakin_reg); ret = uart_register_driver(&anakin_reg);
if (ret == 0) { if (ret == 0) {
......
...@@ -22,37 +22,22 @@ ...@@ -22,37 +22,22 @@
* 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: clps711x.c,v 1.40 2002/07/22 15:27:32 rmk Exp $ * $Id: clps711x.c,v 1.42 2002/07/28 10:03:28 rmk Exp $
* *
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/circ_buf.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/bitops.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ #define SUPPORT_SYSRQ
...@@ -597,7 +582,7 @@ static int __init clps711xuart_init(void) ...@@ -597,7 +582,7 @@ static int __init clps711xuart_init(void)
{ {
int ret, i; int ret, i;
printk(KERN_INFO "Serial: CLPS711x driver $Revision: 1.40 $\n"); printk(KERN_INFO "Serial: CLPS711x driver $Revision: 1.42 $\n");
ret = uart_register_driver(&clps711x_reg); ret = uart_register_driver(&clps711x_reg);
if (ret) if (ret)
...@@ -625,5 +610,5 @@ module_exit(clps711xuart_exit); ...@@ -625,5 +610,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.40 $"); MODULE_DESCRIPTION("CLPS-711x generic serial driver $Revision: 1.42 $");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -22,38 +22,22 @@ ...@@ -22,38 +22,22 @@
* 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: core.c,v 1.91 2002/07/22 15:27:32 rmk Exp $ * $Id: core.c,v 1.100 2002/07/28 10:03:28 rmk Exp $
* *
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/circ_buf.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/sysrq.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/serial.h> /* for serial_state and serial_icounter_struct */ #include <linux/serial.h> /* for serial_state and serial_icounter_struct */
#include <asm/system.h>
#include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/bitops.h>
#undef DEBUG #undef DEBUG
#ifdef DEBUG #ifdef DEBUG
...@@ -931,12 +915,12 @@ uart_wait_modem_status(struct uart_info *info, unsigned long arg) ...@@ -931,12 +915,12 @@ uart_wait_modem_status(struct uart_info *info, unsigned long arg)
*/ */
spin_lock_irq(&port->lock); spin_lock_irq(&port->lock);
memcpy(&cprev, &port->icount, sizeof(struct uart_icount)); memcpy(&cprev, &port->icount, sizeof(struct uart_icount));
spin_unlock_irq(&port->lock);
/* /*
* Force modem status interrupts on * Force modem status interrupts on
*/ */
port->ops->enable_ms(port); port->ops->enable_ms(port);
spin_unlock_irq(&port->lock);
add_wait_queue(&info->delta_msr_wait, &wait); add_wait_queue(&info->delta_msr_wait, &wait);
for (;;) { for (;;) {
...@@ -1200,7 +1184,9 @@ static void uart_close(struct tty_struct *tty, struct file *filp) ...@@ -1200,7 +1184,9 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
* disable the receive line status interrupts. * disable the receive line status interrupts.
*/ */
if (info->flags & UIF_INITIALIZED) { if (info->flags & UIF_INITIALIZED) {
spin_lock_irqsave(&port->lock, flags);
port->ops->stop_rx(port); port->ops->stop_rx(port);
spin_unlock_irqrestore(&port->lock, flags);
/* /*
* Before we drop DTR, make sure the UART transmitter * Before we drop DTR, make sure the UART transmitter
* has completely drained; this is especially * has completely drained; this is especially
...@@ -1948,8 +1934,8 @@ static int uart_pm_set_state(struct uart_state *state, int pm_state, int oldstat ...@@ -1948,8 +1934,8 @@ static int uart_pm_set_state(struct uart_state *state, int pm_state, int oldstat
spin_lock_irq(&port->lock); spin_lock_irq(&port->lock);
ops->stop_tx(port, 0); ops->stop_tx(port, 0);
ops->set_mctrl(port, 0); ops->set_mctrl(port, 0);
spin_unlock_irq(&port->lock);
ops->stop_rx(port); ops->stop_rx(port);
spin_unlock_irq(&port->lock);
ops->shutdown(port); ops->shutdown(port);
} }
if (ops->pm) if (ops->pm)
......
...@@ -21,35 +21,20 @@ ...@@ -21,35 +21,20 @@
* 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: sa1100.c,v 1.43 2002/07/22 15:27:32 rmk Exp $ * $Id: sa1100.c,v 1.50 2002/07/29 14:41:04 rmk Exp $
* *
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/circ_buf.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach/serial_sa1100.h> #include <asm/mach/serial_sa1100.h>
...@@ -190,13 +175,10 @@ static void sa1100_start_tx(struct uart_port *port, unsigned int tty_start) ...@@ -190,13 +175,10 @@ static void sa1100_start_tx(struct uart_port *port, unsigned int tty_start)
static void sa1100_stop_rx(struct uart_port *port) static void sa1100_stop_rx(struct uart_port *port)
{ {
struct sa1100_port *sport = (struct sa1100_port *)port; struct sa1100_port *sport = (struct sa1100_port *)port;
unsigned long flags;
u32 utcr3; u32 utcr3;
spin_lock_irqsave(&sport->port.lock, flags);
utcr3 = UART_GET_UTCR3(sport); utcr3 = UART_GET_UTCR3(sport);
UART_PUT_UTCR3(sport, utcr3 & ~UTCR3_RIE); UART_PUT_UTCR3(sport, utcr3 & ~UTCR3_RIE);
spin_unlock_irqrestore(&sport->port.lock, flags);
} }
/* /*
...@@ -426,7 +408,9 @@ static int sa1100_startup(struct uart_port *port) ...@@ -426,7 +408,9 @@ static int sa1100_startup(struct uart_port *port)
/* /*
* Enable modem status interrupts * Enable modem status interrupts
*/ */
spin_lock_irq(&sport->port.lock);
sa1100_enable_ms(&sport->port); sa1100_enable_ms(&sport->port);
spin_unlock_irq(&sport->port.lock);
return 0; return 0;
} }
...@@ -527,10 +511,11 @@ sa1100_change_speed(struct uart_port *port, unsigned int cflag, ...@@ -527,10 +511,11 @@ sa1100_change_speed(struct uart_port *port, unsigned int cflag,
UART_PUT_UTSR0(sport, -1); UART_PUT_UTSR0(sport, -1);
UART_PUT_UTCR3(sport, old_utcr3); UART_PUT_UTCR3(sport, old_utcr3);
spin_unlock_irqrestore(&sport->port.lock, flags);
if (UART_ENABLE_MS(&sport->port, cflag)) if (UART_ENABLE_MS(&sport->port, cflag))
sa1100_enable_ms(&sport->port); sa1100_enable_ms(&sport->port);
spin_unlock_irqrestore(&sport->port.lock, flags);
} }
static const char *sa1100_type(struct uart_port *port) static const char *sa1100_type(struct uart_port *port)
...@@ -857,7 +842,7 @@ static int __init sa1100_serial_init(void) ...@@ -857,7 +842,7 @@ static int __init sa1100_serial_init(void)
{ {
int ret; int ret;
printk(KERN_INFO "Serial: SA11x0 driver $Revision: 1.43 $\n"); printk(KERN_INFO "Serial: SA11x0 driver $Revision: 1.50 $\n");
sa1100_init_ports(); sa1100_init_ports();
ret = uart_register_driver(&sa1100_reg); ret = uart_register_driver(&sa1100_reg);
...@@ -886,5 +871,5 @@ module_exit(sa1100_serial_exit); ...@@ -886,5 +871,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.43 $"); MODULE_DESCRIPTION("SA1100 generic serial port driver $Revision: 1.50 $");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -21,36 +21,21 @@ ...@@ -21,36 +21,21 @@
* 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: uart00.c,v 1.33 2002/07/21 21:32:31 rmk Exp $ * $Id: uart00.c,v 1.35 2002/07/28 10:03:28 rmk Exp $
* *
*/ */
#include <linux/config.h> #include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/circ_buf.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/console.h> #include <linux/console.h>
#include <linux/sysrq.h> #include <linux/sysrq.h>
#include <linux/pld/pld_hotswap.h> #include <linux/pld/pld_hotswap.h>
#include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
#include <asm/sizes.h> #include <asm/sizes.h>
#if defined(CONFIG_SERIAL_UART00_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #if defined(CONFIG_SERIAL_UART00_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
...@@ -755,7 +740,7 @@ static int __init uart00_init(void) ...@@ -755,7 +740,7 @@ static int __init uart00_init(void)
{ {
int result; int result;
printk(KERN_INFO "Serial: UART00 driver $Revision: 1.33 $\n"); printk(KERN_INFO "Serial: UART00 driver $Revision: 1.35 $\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");
......
...@@ -506,13 +506,18 @@ ...@@ -506,13 +506,18 @@
#define PCI_DEVICE_ID_HP_TACHLITE 0x1029 #define PCI_DEVICE_ID_HP_TACHLITE 0x1029
#define PCI_DEVICE_ID_HP_J2585A 0x1030 #define PCI_DEVICE_ID_HP_J2585A 0x1030
#define PCI_DEVICE_ID_HP_J2585B 0x1031 #define PCI_DEVICE_ID_HP_J2585B 0x1031
#define PCI_DEVICE_ID_HP_SAS 0x1048 #define PCI_DEVICE_ID_HP_DIVA 0x1048
#define PCI_DEVICE_ID_HP_DIVA1 0x1049 #define PCI_DEVICE_ID_HP_DIVA_TOSCA1 0x1049
#define PCI_DEVICE_ID_HP_DIVA2 0x104A #define PCI_DEVICE_ID_HP_DIVA_TOSCA2 0x104A
#define PCI_DEVICE_ID_HP_SP2_0 0x104B #define PCI_DEVICE_ID_HP_DIVA_MAESTRO 0x104B
#define PCI_DEVICE_ID_HP_DIVA_HALFDOME 0x1223
#define PCI_DEVICE_ID_HP_DIVA_KEYSTONE 0x1226
#define PCI_DEVICE_ID_HP_DIVA_POWERBAR 0x1227
#define PCI_DEVICE_ID_HP_ZX1_SBA 0x1229 #define PCI_DEVICE_ID_HP_ZX1_SBA 0x1229
#define PCI_DEVICE_ID_HP_ZX1_IOC 0x122a #define PCI_DEVICE_ID_HP_ZX1_IOC 0x122a
#define PCI_DEVICE_ID_HP_ZX1_LBA 0x122e #define PCI_DEVICE_ID_HP_ZX1_LBA 0x122e
#define PCI_DEVICE_ID_HP_DIVA_EVEREST 0x1282
#define PCI_DEVICE_ID_HP_DIVA_AUX 0x1290
#define PCI_VENDOR_ID_PCTECH 0x1042 #define PCI_VENDOR_ID_PCTECH 0x1042
#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 #define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000
......
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