Commit 6c6a2334 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Russell King

[SERIAL] Make uart_line_info() correctly tell MMIO from I/O port

/proc/tty/driver/serial incorrectly claims that UARTs having iotype of
UPIO_MEM32, UPIO_AU, or UPIO_TSI are I/O mapped.
Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent a4b77573
...@@ -1662,16 +1662,16 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i) ...@@ -1662,16 +1662,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) {
......
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