[PATCH] serial: 8250: Make ISA ports optional

Arnd Bergmann arnd at arndb.de
Tue Jan 6 05:13:59 PST 2015


On Monday 05 January 2015 22:09:45 Peter Hurley wrote:
> Some arches have no need to create unprobed 8250 ports; these phantom
> ports are primarily required for ISA ports which have no probe
> mechanism or to provide non-operational ports for userspace to
> configure (via TIOCSSERIAL and TIOCSERCONFIG ioctls).
> 
> Provide CONFIG_SERIAL_8250_PHANTOM_UARTS knob to disable phantom port
> registration; ie., CONFIG_SERIAL_8250_PHANTOM_UARTS=N only registers
> probed ports (ACPI/PNP, "serial8250" platform devices, PCI, etc).
> 
> Cc: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
> Cc: Tony Lindgren <tony at atomide.com>
> Cc: Grant Likely <grant.likely at linaro.org>
> Cc: Arnd Bergmann <arnd at arndb.de>
> Signed-off-by: Peter Hurley <peter at hurleysoftware.com>

The intent is definitely right, but I think a better approach is
possible.

I haven't tried it here, but how about moving the serial8250_init
function into a separate module, along with all the other parts
that are only used for ISA devices, but leaving the actual core
(all exported symbols) in this file?

At the same time, the serial8250_pnp_init/serial8250_pnp_exit calls
can be removed from the serial8250_init function and become
standalone initcalls.

	Arnd



More information about the linux-arm-kernel mailing list