0145-serial-of-allow-au1x00-and-rt288x-to-load-from-OF.patch 932 B

123456789101112131415161718192021222324252627
  1. From cf52f453acdd9599a1be0fcf0e941bad62046cd4 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <[email protected]>
  3. Date: Tue, 22 Jan 2013 16:01:07 +0100
  4. Subject: [PATCH 145/164] serial: of: allow au1x00 and rt288x to load from OF
  5. In order to make serial_8250 loadable via OF on Au1x00 and Ralink WiSoC we need
  6. to default the iotype to UPIO_AU.
  7. Signed-off-by: John Crispin <[email protected]>
  8. ---
  9. drivers/tty/serial/of_serial.c | 5 ++++-
  10. 1 file changed, 4 insertions(+), 1 deletion(-)
  11. --- a/drivers/tty/serial/of_serial.c
  12. +++ b/drivers/tty/serial/of_serial.c
  13. @@ -98,7 +98,10 @@ static int of_platform_serial_setup(stru
  14. port->regshift = prop;
  15. port->irq = irq_of_parse_and_map(np, 0);
  16. - port->iotype = UPIO_MEM;
  17. + if (of_device_is_compatible(np, "ralink,rt2880-uart"))
  18. + port->iotype = UPIO_AU;
  19. + else
  20. + port->iotype = UPIO_MEM;
  21. if (of_property_read_u32(np, "reg-io-width", &prop) == 0) {
  22. switch (prop) {
  23. case 1: