Commit 66eff0ef authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman

powerpc/legacy_serial: Warn about 8250 devices operated without active FSL workarounds

If the 8250 driver is built as a module (or built-in without console
support) the Freescale specific workaround were silently not activated.
Add a warning in this case.

Currently CONFIG_SERIAL_8250_FSL=y implies that the function
fsl8250_handle_irq() is built-in and can be used. However with the
changes of the next commit CONFIG_SERIAL_8250_FSL might be enabled also
when the 8250 driver is a module and so more care is needed when
fsl8250_handle_irq() is to be used. The code added here is able to
handle the new situation already.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Message-ID: <20230605130857.85543-2-u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2076b2a4
...@@ -508,12 +508,16 @@ static void __init fixup_port_irq(int index, ...@@ -508,12 +508,16 @@ static void __init fixup_port_irq(int index,
port->irq = virq; port->irq = virq;
#ifdef CONFIG_SERIAL_8250_FSL if (IS_ENABLED(CONFIG_SERIAL_8250) &&
if (of_device_is_compatible(np, "fsl,ns16550")) { of_device_is_compatible(np, "fsl,ns16550")) {
port->handle_irq = fsl8250_handle_irq; if (IS_REACHABLE(CONFIG_SERIAL_8250)) {
port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE); port->handle_irq = fsl8250_handle_irq;
port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE);
} else {
pr_warn_once("Not activating Freescale specific workaround for device %pOFP\n",
np);
}
} }
#endif
} }
static void __init fixup_port_pio(int index, static void __init fixup_port_pio(int index,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment