Skip to content

Commit c21182f

Browse files
Phil Elwellpopcornmix
authored andcommitted
amba_pl011: Don't use DT aliases for numbering
The pl011 driver looks for DT aliases of the form "serial<n>", and if found uses <n> as the device ID. This can cause /dev/ttyAMA0 to become /dev/ttyAMA1, which is confusing if the other serial port is provided by the 8250 driver which doesn't use the same logic.
1 parent 23baa58 commit c21182f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/tty/serial/amba-pl011.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,12 @@ static int pl011_setup_port(struct device *dev, struct uart_amba_port *uap,
25782578
if (IS_ERR(base))
25792579
return PTR_ERR(base);
25802580

2581+
/* Don't use DT serial<n> aliases - it causes the device to
2582+
be renumbered to ttyAMA1 if it is the second serial port in the
2583+
system, even though the other one is ttyS0. The 8250 driver
2584+
doesn't use this logic, so always remains ttyS0.
25812585
index = pl011_probe_dt_alias(index, dev);
2586+
*/
25822587

25832588
uap->old_cr = 0;
25842589
uap->port.dev = dev;

0 commit comments

Comments
 (0)