Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: 8250_pxa: honor the port number from devicetree

Like the other OF-enabled drivers, use the port number from the firmware if
the devicetree specifies an alias:

aliases {
...
serial2 = &uart2; /* Should be ttyS2 */
}

This is how the deprecated pxa.c driver behaved, switching to 8250_pxa
messes up the numbering.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lubomir Rintel and committed by
Greg Kroah-Hartman
fe9ed6d2 d56f00fd

+4
+4
drivers/tty/serial/8250/8250_pxa.c
··· 113 113 if (ret) 114 114 return ret; 115 115 116 + ret = of_alias_get_id(pdev->dev.of_node, "serial"); 117 + if (ret >= 0) 118 + uart.port.line = ret; 119 + 116 120 uart.port.type = PORT_XSCALE; 117 121 uart.port.iotype = UPIO_MEM32; 118 122 uart.port.mapbase = mmres->start;