diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-13 19:38:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-13 19:38:02 -0400 |
commit | 7b69a4c360e8787877ebf5e42609b8bab13afa6a (patch) | |
tree | 3eaaae28ed398396f0f3f134e53dd8a730574781 /drivers/serial | |
parent | a23f4636c9ae7f1f15c448080f1552864b404136 (diff) | |
parent | 68aa2c0d4a36b43ea9c6d77134c94b4501fd2eb4 (diff) |
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
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250.c | 25 | ||||
-rw-r--r-- | drivers/serial/dz.c | 2 | ||||
-rw-r--r-- | drivers/serial/ip22zilog.c | 3 | ||||
-rw-r--r-- | drivers/serial/serial_core.c | 1 |
4 files changed, 24 insertions, 7 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 0995430e4cf1..0ae9ced00ed4 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -299,6 +299,7 @@ static inline int map_8250_out_reg(struct uart_8250_port *up, int offset) | |||
299 | 299 | ||
300 | static unsigned int serial_in(struct uart_8250_port *up, int offset) | 300 | static unsigned int serial_in(struct uart_8250_port *up, int offset) |
301 | { | 301 | { |
302 | unsigned int tmp; | ||
302 | offset = map_8250_in_reg(up, offset) << up->port.regshift; | 303 | offset = map_8250_in_reg(up, offset) << up->port.regshift; |
303 | 304 | ||
304 | switch (up->port.iotype) { | 305 | switch (up->port.iotype) { |
@@ -317,6 +318,13 @@ static unsigned int serial_in(struct uart_8250_port *up, int offset) | |||
317 | return __raw_readl(up->port.membase + offset); | 318 | return __raw_readl(up->port.membase + offset); |
318 | #endif | 319 | #endif |
319 | 320 | ||
321 | case UPIO_TSI: | ||
322 | if (offset == UART_IIR) { | ||
323 | tmp = readl((u32 *)(up->port.membase + UART_RX)); | ||
324 | return (cpu_to_le32(tmp) >> 8) & 0xff; | ||
325 | } else | ||
326 | return readb(up->port.membase + offset); | ||
327 | |||
320 | default: | 328 | default: |
321 | return inb(up->port.iobase + offset); | 329 | return inb(up->port.iobase + offset); |
322 | } | 330 | } |
@@ -346,6 +354,10 @@ serial_out(struct uart_8250_port *up, int offset, int value) | |||
346 | __raw_writel(value, up->port.membase + offset); | 354 | __raw_writel(value, up->port.membase + offset); |
347 | break; | 355 | break; |
348 | #endif | 356 | #endif |
357 | case UPIO_TSI: | ||
358 | if (!((offset == UART_IER) && (value & UART_IER_UUE))) | ||
359 | writeb(value, up->port.membase + offset); | ||
360 | break; | ||
349 | 361 | ||
350 | default: | 362 | default: |
351 | outb(value, up->port.iobase + offset); | 363 | outb(value, up->port.iobase + offset); |
@@ -2240,10 +2252,14 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
2240 | 2252 | ||
2241 | touch_nmi_watchdog(); | 2253 | touch_nmi_watchdog(); |
2242 | 2254 | ||
2243 | if (oops_in_progress) { | 2255 | local_irq_save(flags); |
2244 | locked = spin_trylock_irqsave(&up->port.lock, flags); | 2256 | if (up->port.sysrq) { |
2257 | /* serial8250_handle_port() already took the lock */ | ||
2258 | locked = 0; | ||
2259 | } else if (oops_in_progress) { | ||
2260 | locked = spin_trylock(&up->port.lock); | ||
2245 | } else | 2261 | } else |
2246 | spin_lock_irqsave(&up->port.lock, flags); | 2262 | spin_lock(&up->port.lock); |
2247 | 2263 | ||
2248 | /* | 2264 | /* |
2249 | * First save the IER then disable the interrupts | 2265 | * First save the IER then disable the interrupts |
@@ -2265,7 +2281,8 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
2265 | serial_out(up, UART_IER, ier); | 2281 | serial_out(up, UART_IER, ier); |
2266 | 2282 | ||
2267 | if (locked) | 2283 | if (locked) |
2268 | spin_unlock_irqrestore(&up->port.lock, flags); | 2284 | spin_unlock(&up->port.lock); |
2285 | local_irq_restore(flags); | ||
2269 | } | 2286 | } |
2270 | 2287 | ||
2271 | static int serial8250_console_setup(struct console *co, char *options) | 2288 | static int serial8250_console_setup(struct console *co, char *options) |
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c index d119c8296a78..8a98aae80e22 100644 --- a/drivers/serial/dz.c +++ b/drivers/serial/dz.c | |||
@@ -673,7 +673,7 @@ static void dz_reset(struct dz_port *dport) | |||
673 | } | 673 | } |
674 | 674 | ||
675 | #ifdef CONFIG_SERIAL_DZ_CONSOLE | 675 | #ifdef CONFIG_SERIAL_DZ_CONSOLE |
676 | static void dz_console_putchar(struct uart_port *port, int ch) | 676 | static void dz_console_putchar(struct uart_port *uport, int ch) |
677 | { | 677 | { |
678 | struct dz_port *dport = (struct dz_port *)uport; | 678 | struct dz_port *dport = (struct dz_port *)uport; |
679 | unsigned long flags; | 679 | unsigned long flags; |
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c index 342042889f6e..5ff269fb604c 100644 --- a/drivers/serial/ip22zilog.c +++ b/drivers/serial/ip22zilog.c | |||
@@ -1143,9 +1143,8 @@ static void __init ip22zilog_prepare(void) | |||
1143 | up[(chip * 2) + 1].port.fifosize = 1; | 1143 | up[(chip * 2) + 1].port.fifosize = 1; |
1144 | up[(chip * 2) + 1].port.ops = &ip22zilog_pops; | 1144 | up[(chip * 2) + 1].port.ops = &ip22zilog_pops; |
1145 | up[(chip * 2) + 1].port.type = PORT_IP22ZILOG; | 1145 | up[(chip * 2) + 1].port.type = PORT_IP22ZILOG; |
1146 | up[(chip * 2) + 1].port.flags |= IP22ZILOG_FLAG_IS_CHANNEL_A; | ||
1147 | up[(chip * 2) + 1].port.line = (chip * 2) + 1; | 1146 | up[(chip * 2) + 1].port.line = (chip * 2) + 1; |
1148 | up[(chip * 2) + 1].flags = 0; | 1147 | up[(chip * 2) + 1].flags |= IP22ZILOG_FLAG_IS_CHANNEL_A; |
1149 | } | 1148 | } |
1150 | } | 1149 | } |
1151 | 1150 | ||
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index d5f636fbf29a..80ef7d482756 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -2036,6 +2036,7 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port) | |||
2036 | case UPIO_MEM: | 2036 | case UPIO_MEM: |
2037 | case UPIO_MEM32: | 2037 | case UPIO_MEM32: |
2038 | case UPIO_AU: | 2038 | case UPIO_AU: |
2039 | case UPIO_TSI: | ||
2039 | snprintf(address, sizeof(address), | 2040 | snprintf(address, sizeof(address), |
2040 | "MMIO 0x%lx", port->mapbase); | 2041 | "MMIO 0x%lx", port->mapbase); |
2041 | break; | 2042 | break; |