Commit 6f3a28f7 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial

* 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial: (21 commits)
  [SERIAL] add PNP IDs for FPI based touchscreens
  [SERIAL] Magic SysRq SAK does nothing on serial consoles
  [SERIAL] tickle NMI watchdog on serial output.
  [SERIAL] Fix oops when removing suspended serial port
  [SERIAL] Fix resume handling bug
  [SERIAL] Remove wrong asm/serial.h inclusions
  [SERIAL] CONFIG_PM=n slim: drivers/serial/8250_pci.c
  [SERIAL] OMAP1510 serial fix for 115200 baud
  [SERIAL] returning proper error from serial core driver
  [SERIAL] Make uart_line_info() correctly tell MMIO from I/O port
  [SERIAL] suspend/resume handlers don't have level arg anymore
  [SERIAL] 8250 resourse management fixes
  [SERIAL] serial_cs: Add quirk for brainboxes 2-port RS232 card
  [SERIAL] serial_cs: handle Nokia multi->single port bodge via config quirk
  [SERIAL] serial_cs: add configuration quirk
  [SERIAL] serial_cs: Convert Oxford 950 / Possio GCC wakeup quirk
  [SERIAL] serial_cs: convert IBM post-init handling to a quirk
  [SERIAL] serial_cs: allow wildcarded quirks
  [SERIAL] serial_cs: convert multi-port table to quirk table
  [SERIAL] serial_cs: Use clean up multiport card detection
  ...
parents 6ebfc0e2 75fde2ed
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/serial.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/pgalloc.h> #include <asm/pgalloc.h>
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/sal.h> #include <asm/sal.h>
#include <asm/sections.h> #include <asm/sections.h>
#include <asm/serial.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/smp.h> #include <asm/smp.h>
#include <asm/system.h> #include <asm/system.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/reboot.h> #include <asm/reboot.h>
#include <asm/gt64120.h> #include <asm/gt64120.h>
#include <asm/serial.h>
#include <asm/mach-cobalt/cobalt.h> #include <asm/mach-cobalt/cobalt.h>
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <asm/cpu.h> #include <asm/cpu.h>
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/serial.h>
#include <asm/lasat/lasat.h> #include <asm/lasat/lasat.h>
#include <asm/lasat/serial.h> #include <asm/lasat/serial.h>
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/serial.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
......
...@@ -87,7 +87,6 @@ ...@@ -87,7 +87,6 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/init.h> #include <linux/init.h>
#include <asm/serial.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
......
...@@ -1896,6 +1896,17 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios, ...@@ -1896,6 +1896,17 @@ serial8250_set_termios(struct uart_port *port, struct termios *termios,
serial_outp(up, UART_EFR, efr); serial_outp(up, UART_EFR, efr);
} }
#ifdef CONFIG_ARCH_OMAP15XX
/* Workaround to enable 115200 baud on OMAP1510 internal ports */
if (cpu_is_omap1510() && is_omap_port((unsigned int)up->port.membase)) {
if (baud == 115200) {
quot = 1;
serial_out(up, UART_OMAP_OSC_12M_SEL, 1);
} else
serial_out(up, UART_OMAP_OSC_12M_SEL, 0);
}
#endif
if (up->capabilities & UART_NATSEMI) { if (up->capabilities & UART_NATSEMI) {
/* Switch to bank 2 not bank 1, to avoid resetting EXCR2 */ /* Switch to bank 2 not bank 1, to avoid resetting EXCR2 */
serial_outp(up, UART_LCR, 0xe0); serial_outp(up, UART_LCR, 0xe0);
...@@ -1949,6 +1960,8 @@ static int serial8250_request_std_resource(struct uart_8250_port *up) ...@@ -1949,6 +1960,8 @@ static int serial8250_request_std_resource(struct uart_8250_port *up)
case UPIO_AU: case UPIO_AU:
size = 0x100000; size = 0x100000;
/* fall thru */ /* fall thru */
case UPIO_TSI:
case UPIO_MEM32:
case UPIO_MEM: case UPIO_MEM:
if (!up->port.mapbase) if (!up->port.mapbase)
break; break;
...@@ -1984,6 +1997,8 @@ static void serial8250_release_std_resource(struct uart_8250_port *up) ...@@ -1984,6 +1997,8 @@ static void serial8250_release_std_resource(struct uart_8250_port *up)
case UPIO_AU: case UPIO_AU:
size = 0x100000; size = 0x100000;
/* fall thru */ /* fall thru */
case UPIO_TSI:
case UPIO_MEM32:
case UPIO_MEM: case UPIO_MEM:
if (!up->port.mapbase) if (!up->port.mapbase)
break; break;
...@@ -2007,17 +2022,15 @@ static int serial8250_request_rsa_resource(struct uart_8250_port *up) ...@@ -2007,17 +2022,15 @@ static int serial8250_request_rsa_resource(struct uart_8250_port *up)
{ {
unsigned long start = UART_RSA_BASE << up->port.regshift; unsigned long start = UART_RSA_BASE << up->port.regshift;
unsigned int size = 8 << up->port.regshift; unsigned int size = 8 << up->port.regshift;
int ret = 0; int ret = -EINVAL;
switch (up->port.iotype) { switch (up->port.iotype) {
case UPIO_MEM:
ret = -EINVAL;
break;
case UPIO_HUB6: case UPIO_HUB6:
case UPIO_PORT: case UPIO_PORT:
start += up->port.iobase; start += up->port.iobase;
if (!request_region(start, size, "serial-rsa")) if (request_region(start, size, "serial-rsa"))
ret = 0;
else
ret = -EBUSY; ret = -EBUSY;
break; break;
} }
...@@ -2031,9 +2044,6 @@ static void serial8250_release_rsa_resource(struct uart_8250_port *up) ...@@ -2031,9 +2044,6 @@ static void serial8250_release_rsa_resource(struct uart_8250_port *up)
unsigned int size = 8 << up->port.regshift; unsigned int size = 8 << up->port.regshift;
switch (up->port.iotype) { switch (up->port.iotype) {
case UPIO_MEM:
break;
case UPIO_HUB6: case UPIO_HUB6:
case UPIO_PORT: case UPIO_PORT:
release_region(up->port.iobase + offset, size); release_region(up->port.iobase + offset, size);
...@@ -2222,9 +2232,10 @@ static inline void wait_for_xmitr(struct uart_8250_port *up, int bits) ...@@ -2222,9 +2232,10 @@ static inline void wait_for_xmitr(struct uart_8250_port *up, int bits)
/* Wait up to 1s for flow control if necessary */ /* Wait up to 1s for flow control if necessary */
if (up->port.flags & UPF_CONS_FLOW) { if (up->port.flags & UPF_CONS_FLOW) {
tmout = 1000000; tmout = 1000000;
while (--tmout && while (!(serial_in(up, UART_MSR) & UART_MSR_CTS) && --tmout) {
((serial_in(up, UART_MSR) & UART_MSR_CTS) == 0))
udelay(1); udelay(1);
touch_nmi_watchdog();
}
} }
} }
...@@ -2397,7 +2408,6 @@ int __init early_serial_setup(struct uart_port *port) ...@@ -2397,7 +2408,6 @@ int __init early_serial_setup(struct uart_port *port)
/** /**
* serial8250_suspend_port - suspend one serial port * serial8250_suspend_port - suspend one serial port
* @line: serial line number * @line: serial line number
* @level: the level of port suspension, as per uart_suspend_port
* *
* Suspend one serial port. * Suspend one serial port.
*/ */
...@@ -2409,7 +2419,6 @@ void serial8250_suspend_port(int line) ...@@ -2409,7 +2419,6 @@ void serial8250_suspend_port(int line)
/** /**
* serial8250_resume_port - resume one serial port * serial8250_resume_port - resume one serial port
* @line: serial line number * @line: serial line number
* @level: the level of port resumption, as per uart_resume_port
* *
* Resume one serial port. * Resume one serial port.
*/ */
......
...@@ -1789,6 +1789,7 @@ static void __devexit pciserial_remove_one(struct pci_dev *dev) ...@@ -1789,6 +1789,7 @@ static void __devexit pciserial_remove_one(struct pci_dev *dev)
pci_disable_device(dev); pci_disable_device(dev);
} }
#ifdef CONFIG_PM
static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state) static int pciserial_suspend_one(struct pci_dev *dev, pm_message_t state)
{ {
struct serial_private *priv = pci_get_drvdata(dev); struct serial_private *priv = pci_get_drvdata(dev);
...@@ -1818,6 +1819,7 @@ static int pciserial_resume_one(struct pci_dev *dev) ...@@ -1818,6 +1819,7 @@ static int pciserial_resume_one(struct pci_dev *dev)
} }
return 0; return 0;
} }
#endif
static struct pci_device_id serial_pci_tbl[] = { static struct pci_device_id serial_pci_tbl[] = {
{ PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960, { PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
...@@ -2375,8 +2377,10 @@ static struct pci_driver serial_pci_driver = { ...@@ -2375,8 +2377,10 @@ static struct pci_driver serial_pci_driver = {
.name = "serial", .name = "serial",
.probe = pciserial_init_one, .probe = pciserial_init_one,
.remove = __devexit_p(pciserial_remove_one), .remove = __devexit_p(pciserial_remove_one),
#ifdef CONFIG_PM
.suspend = pciserial_suspend_one, .suspend = pciserial_suspend_one,
.resume = pciserial_resume_one, .resume = pciserial_resume_one,
#endif
.id_table = serial_pci_tbl, .id_table = serial_pci_tbl,
}; };
......
...@@ -327,6 +327,19 @@ static const struct pnp_device_id pnp_dev_table[] = { ...@@ -327,6 +327,19 @@ static const struct pnp_device_id pnp_dev_table[] = {
{ "WACF004", 0 }, { "WACF004", 0 },
{ "WACF005", 0 }, { "WACF005", 0 },
{ "WACF006", 0 }, { "WACF006", 0 },
/* Compaq touchscreen */
{ "FPI2002", 0 },
/* Fujitsu Stylistic touchscreens */
{ "FUJ02B2", 0 },
{ "FUJ02B3", 0 },
/* Fujitsu Stylistic LT touchscreens */
{ "FUJ02B4", 0 },
/* Passive Fujitsu Stylistic touchscreens */
{ "FUJ02B6", 0 },
{ "FUJ02B7", 0 },
{ "FUJ02B8", 0 },
{ "FUJ02B9", 0 },
{ "FUJ02BC", 0 },
/* Rockwell's (PORALiNK) 33600 INT PNP */ /* Rockwell's (PORALiNK) 33600 INT PNP */
{ "WCI0003", 0 }, { "WCI0003", 0 },
/* Unkown PnP modems */ /* Unkown PnP modems */
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
*/ */
#define is_real_interrupt(irq) ((irq) != 0) #define is_real_interrupt(irq) ((irq) != 0)
#include <asm/serial.h> #define BASE_BAUD 115200
/* Standard COM flags */ /* Standard COM flags */
#define STD_COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST) #define STD_COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)
...@@ -86,7 +86,6 @@ ...@@ -86,7 +86,6 @@
* standard enumeration mechanism. Platforms that can find all * standard enumeration mechanism. Platforms that can find all
* serial ports via mechanisms like ACPI or PCI need not supply it. * serial ports via mechanisms like ACPI or PCI need not supply it.
*/ */
#undef SERIAL_PORT_DFNS
#if defined(CONFIG_PLAT_USRV) #if defined(CONFIG_PLAT_USRV)
#define SERIAL_PORT_DFNS \ #define SERIAL_PORT_DFNS \
...@@ -109,7 +108,7 @@ ...@@ -109,7 +108,7 @@
#endif /* !CONFIG_PLAT_USRV */ #endif /* !CONFIG_PLAT_USRV */
static struct old_serial_port old_serial_port[] = { static struct old_serial_port old_serial_port[] = {
SERIAL_PORT_DFNS /* defined in asm/serial.h */ SERIAL_PORT_DFNS
}; };
#define UART_NR ARRAY_SIZE(old_serial_port) #define UART_NR ARRAY_SIZE(old_serial_port)
......
...@@ -792,6 +792,7 @@ static int uart_set_info(struct uart_state *state, ...@@ -792,6 +792,7 @@ static int uart_set_info(struct uart_state *state,
* We failed anyway. * We failed anyway.
*/ */
retval = -EBUSY; retval = -EBUSY;
goto exit; // Added to return the correct error -Ram Gupta
} }
} }
...@@ -1662,16 +1663,16 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i) ...@@ -1662,16 +1663,16 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i)
struct uart_port *port = state->port; struct uart_port *port = state->port;
char stat_buf[32]; char stat_buf[32];
unsigned int status; unsigned int status;
int ret; int mmio, ret;
if (!port) if (!port)
return 0; return 0;
mmio = port->iotype >= UPIO_MEM;
ret = sprintf(buf, "%d: uart:%s %s%08lX irq:%d", ret = sprintf(buf, "%d: uart:%s %s%08lX irq:%d",
port->line, uart_type(port), port->line, uart_type(port),
port->iotype == UPIO_MEM ? "mmio:0x" : "port:", mmio ? "mmio:0x" : "port:",
port->iotype == UPIO_MEM ? port->mapbase : mmio ? port->mapbase : (unsigned long) port->iobase,
(unsigned long) port->iobase,
port->irq); port->irq);
if (port->type == PORT_UNKNOWN) { if (port->type == PORT_UNKNOWN) {
...@@ -1939,6 +1940,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) ...@@ -1939,6 +1940,9 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
if (state->info && state->info->flags & UIF_INITIALIZED) { if (state->info && state->info->flags & UIF_INITIALIZED) {
const struct uart_ops *ops = port->ops; const struct uart_ops *ops = port->ops;
state->info->flags = (state->info->flags & ~UIF_INITIALIZED)
| UIF_SUSPENDED;
spin_lock_irq(&port->lock); spin_lock_irq(&port->lock);
ops->stop_tx(port); ops->stop_tx(port);
ops->set_mctrl(port, 0); ops->set_mctrl(port, 0);
...@@ -2005,7 +2009,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) ...@@ -2005,7 +2009,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
console_start(port->cons); console_start(port->cons);
} }
if (state->info && state->info->flags & UIF_INITIALIZED) { if (state->info && state->info->flags & UIF_SUSPENDED) {
const struct uart_ops *ops = port->ops; const struct uart_ops *ops = port->ops;
int ret; int ret;
...@@ -2017,15 +2021,17 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) ...@@ -2017,15 +2021,17 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
ops->set_mctrl(port, port->mctrl); ops->set_mctrl(port, port->mctrl);
ops->start_tx(port); ops->start_tx(port);
spin_unlock_irq(&port->lock); spin_unlock_irq(&port->lock);
state->info->flags |= UIF_INITIALIZED;
} else { } else {
/* /*
* Failed to resume - maybe hardware went away? * Failed to resume - maybe hardware went away?
* Clear the "initialized" flag so we won't try * Clear the "initialized" flag so we won't try
* to call the low level drivers shutdown method. * to call the low level drivers shutdown method.
*/ */
state->info->flags &= ~UIF_INITIALIZED;
uart_shutdown(state); uart_shutdown(state);
} }
state->info->flags &= ~UIF_SUSPENDED;
} }
mutex_unlock(&state->mutex); mutex_unlock(&state->mutex);
......
This diff is collapsed.
...@@ -990,7 +990,6 @@ int __init early_serial_txx9_setup(struct uart_port *port) ...@@ -990,7 +990,6 @@ int __init early_serial_txx9_setup(struct uart_port *port)
/** /**
* serial_txx9_suspend_port - suspend one serial port * serial_txx9_suspend_port - suspend one serial port
* @line: serial line number * @line: serial line number
* @level: the level of port suspension, as per uart_suspend_port
* *
* Suspend one serial port. * Suspend one serial port.
*/ */
...@@ -1002,7 +1001,6 @@ static void serial_txx9_suspend_port(int line) ...@@ -1002,7 +1001,6 @@ static void serial_txx9_suspend_port(int line)
/** /**
* serial_txx9_resume_port - resume one serial port * serial_txx9_resume_port - resume one serial port
* @line: serial line number * @line: serial line number
* @level: the level of port resumption, as per uart_resume_port
* *
* Resume one serial port. * Resume one serial port.
*/ */
......
...@@ -319,6 +319,7 @@ struct uart_info { ...@@ -319,6 +319,7 @@ struct uart_info {
#define UIF_CTS_FLOW ((__force uif_t) (1 << 26)) #define UIF_CTS_FLOW ((__force uif_t) (1 << 26))
#define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29)) #define UIF_NORMAL_ACTIVE ((__force uif_t) (1 << 29))
#define UIF_INITIALIZED ((__force uif_t) (1 << 31)) #define UIF_INITIALIZED ((__force uif_t) (1 << 31))
#define UIF_SUSPENDED ((__force uif_t) (1 << 30))
int blocked_open; int blocked_open;
...@@ -414,7 +415,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch, ...@@ -414,7 +415,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch,
#ifdef SUPPORT_SYSRQ #ifdef SUPPORT_SYSRQ
if (port->sysrq) { if (port->sysrq) {
if (ch && time_before(jiffies, port->sysrq)) { if (ch && time_before(jiffies, port->sysrq)) {
handle_sysrq(ch, regs, NULL); handle_sysrq(ch, regs, port->info->tty);
port->sysrq = 0; port->sysrq = 0;
return 1; return 1;
} }
......
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