Commit 427502ff authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Russell King

[SERIAL] Fix /proc serial info for MMIO ports

Patch from: Bjorn Helgaas

This patch against 2.6.2 fixes a minor issue with /proc/tty/drivers/*,
which currently doesn't show MMIO address information.  Current
sample output:

        # cat /proc/tty/driver/serial
        serinfo:1.0 driver revision:
        0: uart:16450 port:00000000 irq:65 tx:72 rx:0 RTS|DTR
        1: uart:16550A port:00000000 irq:65 tx:2950 rx:0 RTS|DTR
        ...

Output with the attached patch:

        # cat /proc/tty/driver/serial
        serinfo:1.0 driver revision:
        0: uart:16450 mmio:0xF8031000 irq:65 tx:72 rx:0 RTS|DTR
        1: uart:16550A mmio:0xFF5E0000 irq:65 tx:2403 rx:74 RTS|DTR
        ...
parent 28a1fbf7
......@@ -1666,9 +1666,12 @@ static int uart_line_info(char *buf, struct uart_driver *drv, int i)
if (!port)
return 0;
ret = sprintf(buf, "%d: uart:%s port:%08X irq:%d",
ret = sprintf(buf, "%d: uart:%s %s%08lX irq:%d",
port->line, uart_type(port),
port->iobase, port->irq);
port->iotype == UPIO_MEM ? "mmio:0x" : "port:",
port->iotype == UPIO_MEM ? port->mapbase :
(unsigned long) port->iobase,
port->irq);
if (port->type == PORT_UNKNOWN) {
strcat(buf, "\n");
......@@ -1871,6 +1874,9 @@ uart_set_options(struct uart_port *port, struct console *co,
if (flow == 'r')
termios.c_cflag |= CRTSCTS;
if (!port->ops)
return 0; /* "console=" on ia64 */
port->ops->set_termios(port, &termios, NULL);
co->cflag = termios.c_cflag;
......
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