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

* master.kernel.org:/home/rmk/linux-2.6-serial:
  [SERIAL] 8250: sysrq deadlock fix
  [SERIAL] 8250: add tsi108 serial support
  [SERIAL] IP22: fix serial console hangs
  [SERIAL] dz: Fix compilation error
This commit is contained in:
Linus Torvalds 2006-07-13 16:38:02 -07:00
Родитель a23f4636c9 68aa2c0d4a
Коммит 7b69a4c360
5 изменённых файлов: 25 добавлений и 7 удалений

Просмотреть файл

@ -299,6 +299,7 @@ static inline int map_8250_out_reg(struct uart_8250_port *up, int offset)
static unsigned int serial_in(struct uart_8250_port *up, int offset)
{
unsigned int tmp;
offset = map_8250_in_reg(up, offset) << up->port.regshift;
switch (up->port.iotype) {
@ -317,6 +318,13 @@ static unsigned int serial_in(struct uart_8250_port *up, int offset)
return __raw_readl(up->port.membase + offset);
#endif
case UPIO_TSI:
if (offset == UART_IIR) {
tmp = readl((u32 *)(up->port.membase + UART_RX));
return (cpu_to_le32(tmp) >> 8) & 0xff;
} else
return readb(up->port.membase + offset);
default:
return inb(up->port.iobase + offset);
}
@ -346,6 +354,10 @@ serial_out(struct uart_8250_port *up, int offset, int value)
__raw_writel(value, up->port.membase + offset);
break;
#endif
case UPIO_TSI:
if (!((offset == UART_IER) && (value & UART_IER_UUE)))
writeb(value, up->port.membase + offset);
break;
default:
outb(value, up->port.iobase + offset);
@ -2240,10 +2252,14 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
touch_nmi_watchdog();
if (oops_in_progress) {
locked = spin_trylock_irqsave(&up->port.lock, flags);
local_irq_save(flags);
if (up->port.sysrq) {
/* serial8250_handle_port() already took the lock */
locked = 0;
} else if (oops_in_progress) {
locked = spin_trylock(&up->port.lock);
} else
spin_lock_irqsave(&up->port.lock, flags);
spin_lock(&up->port.lock);
/*
* First save the IER then disable the interrupts
@ -2265,7 +2281,8 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count)
serial_out(up, UART_IER, ier);
if (locked)
spin_unlock_irqrestore(&up->port.lock, flags);
spin_unlock(&up->port.lock);
local_irq_restore(flags);
}
static int serial8250_console_setup(struct console *co, char *options)

Просмотреть файл

@ -673,7 +673,7 @@ static void dz_reset(struct dz_port *dport)
}
#ifdef CONFIG_SERIAL_DZ_CONSOLE
static void dz_console_putchar(struct uart_port *port, int ch)
static void dz_console_putchar(struct uart_port *uport, int ch)
{
struct dz_port *dport = (struct dz_port *)uport;
unsigned long flags;

Просмотреть файл

@ -1143,9 +1143,8 @@ static void __init ip22zilog_prepare(void)
up[(chip * 2) + 1].port.fifosize = 1;
up[(chip * 2) + 1].port.ops = &ip22zilog_pops;
up[(chip * 2) + 1].port.type = PORT_IP22ZILOG;
up[(chip * 2) + 1].port.flags |= IP22ZILOG_FLAG_IS_CHANNEL_A;
up[(chip * 2) + 1].port.line = (chip * 2) + 1;
up[(chip * 2) + 1].flags = 0;
up[(chip * 2) + 1].flags |= IP22ZILOG_FLAG_IS_CHANNEL_A;
}
}

Просмотреть файл

@ -2036,6 +2036,7 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
case UPIO_MEM:
case UPIO_MEM32:
case UPIO_AU:
case UPIO_TSI:
snprintf(address, sizeof(address),
"MMIO 0x%lx", port->mapbase);
break;

Просмотреть файл

@ -227,6 +227,7 @@ struct uart_port {
#define UPIO_MEM (2)
#define UPIO_MEM32 (3)
#define UPIO_AU (4) /* Au1x00 type IO */
#define UPIO_TSI (5) /* Tsi108/109 type IO */
unsigned int read_status_mask; /* driver specific */
unsigned int ignore_status_mask; /* driver specific */