0153-amba_pl011-Don-t-use-DT-aliases-for-numbering.patch 1.1 KB

1234567891011121314151617181920212223242526272829
  1. From 39f58f568f34295be6c0b9a2f6f2e502b9305c01 Mon Sep 17 00:00:00 2001
  2. From: Phil Elwell <phil@raspberrypi.org>
  3. Date: Tue, 23 Feb 2016 17:26:48 +0000
  4. Subject: [PATCH] amba_pl011: Don't use DT aliases for numbering
  5. The pl011 driver looks for DT aliases of the form "serial<n>",
  6. and if found uses <n> as the device ID. This can cause
  7. /dev/ttyAMA0 to become /dev/ttyAMA1, which is confusing if the
  8. other serial port is provided by the 8250 driver which doesn't
  9. use the same logic.
  10. ---
  11. drivers/tty/serial/amba-pl011.c | 5 +++++
  12. 1 file changed, 5 insertions(+)
  13. --- a/drivers/tty/serial/amba-pl011.c
  14. +++ b/drivers/tty/serial/amba-pl011.c
  15. @@ -2313,7 +2313,12 @@ static int pl011_setup_port(struct devic
  16. if (IS_ERR(base))
  17. return PTR_ERR(base);
  18. + /* Don't use DT serial<n> aliases - it causes the device to
  19. + be renumbered to ttyAMA1 if it is the second serial port in the
  20. + system, even though the other one is ttyS0. The 8250 driver
  21. + doesn't use this logic, so always remains ttyS0.
  22. index = pl011_probe_dt_alias(index, dev);
  23. + */
  24. uap->old_cr = 0;
  25. uap->port.dev = dev;