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

123456789101112131415161718192021222324252627
  1. From 49b47dfcef1353cd28eac8f64170e75d28ce4311 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <blogic@openwrt.org>
  3. Date: Sun, 14 Jul 2013 23:18:57 +0200
  4. Subject: [PATCH 29/57] 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 <blogic@openwrt.org>
  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. @@ -102,7 +102,10 @@ static int of_platform_serial_setup(stru
  14. port->fifosize = 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: