1 From 6cb39aa657aac56c018245d7c0457d4340a79c7f Mon Sep 17 00:00:00 2001
2 From: Lubomir Rintel <lkundrak@v3.sk>
3 Date: Sun, 24 Feb 2019 12:58:02 +0100
4 Subject: serial: 8250_pxa: honor the port number from devicetree
6 [ Upstream commit fe9ed6d2483fda55465f32924fb15bce0fac3fac ]
8 Like the other OF-enabled drivers, use the port number from the firmware if
9 the devicetree specifies an alias:
13 serial2 = &uart2; /* Should be ttyS2 */
16 This is how the deprecated pxa.c driver behaved, switching to 8250_pxa
17 messes up the numbering.
19 Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
21 Signed-off-by: Sasha Levin <sashal@kernel.org>
23 drivers/tty/serial/8250/8250_pxa.c | 4 ++++
24 1 file changed, 4 insertions(+)
26 diff --git a/drivers/tty/serial/8250/8250_pxa.c b/drivers/tty/serial/8250/8250_pxa.c
27 index 4d68731af534..de1372ba24b1 100644
28 --- a/drivers/tty/serial/8250/8250_pxa.c
29 +++ b/drivers/tty/serial/8250/8250_pxa.c
30 @@ -118,6 +118,10 @@ static int serial_pxa_probe(struct platform_device *pdev)
34 + ret = of_alias_get_id(pdev->dev.of_node, "serial");
36 + uart.port.line = ret;
38 uart.port.type = PORT_XSCALE;
39 uart.port.iotype = UPIO_MEM32;
40 uart.port.mapbase = mmres->start;