serial: Enable Freescale 16550 workaround on arm
authorScott Wood <scottwood@freescale.com>
Wed, 7 Oct 2015 22:31:21 +0000 (17:31 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Oct 2015 04:05:46 +0000 (21:05 -0700)
The same serial hardware is present on LS2080A which is arm64, and
LS1021A which is arm32, so don't limit the workaround to PPC.

Unlike PPC which uses arch/powerpc/kernel/legacy_serial.c, the ARM
targets use drivers/tty/serial/of_serial.c, so add the handle_irq
override check there as well.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/Kconfig
drivers/tty/serial/of_serial.c

index 656a1737d509b2a2533dd35536001442d4b8aad5..43925571e1775a1a730a1bb610a56a1d20b5ab75 100644 (file)
@@ -274,8 +274,8 @@ config SERIAL_8250_ACORN
 
 config SERIAL_8250_FSL
        bool
-       depends on SERIAL_8250_CONSOLE && PPC_UDBG_16550
-       default PPC
+       depends on SERIAL_8250_CONSOLE
+       default PPC || ARM || ARM64
 
 config SERIAL_8250_DW
        tristate "Support for Synopsys DesignWare 8250 quirks"
index e08df9775983a053b9c7f58eb17c6910a391d166..de50296497955c0387f4865ce582d3ce024e6470 100644 (file)
@@ -154,6 +154,11 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
                break;
        }
 
+       if (IS_ENABLED(CONFIG_SERIAL_8250_FSL) &&
+           (of_device_is_compatible(np, "fsl,ns16550") ||
+            of_device_is_compatible(np, "fsl,16550-FIFO64")))
+               port->handle_irq = fsl8250_handle_irq;
+
        return 0;
 out:
        if (info->clk)