parport_pc: Also enable driver for PCI systems
authorMaciej W. Rozycki <macro@orcam.me.uk>
Mon, 14 Feb 2022 20:16:50 +0000 (20:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Mar 2022 13:01:41 +0000 (14:01 +0100)
Nowadays PC-style parallel ports come in the form of PCI and PCIe option
cards and there are some combined parallel/serial option cards as well
that we handle in the parport subsystem.  There is nothing in particular
that would prevent them from being used in any system equipped with PCI
or PCIe connectivity, except that we do not permit the PARPORT_PC config
option to be selected for platforms for which ARCH_MIGHT_HAVE_PC_PARPORT
has not been set for.

The only PCI platforms that actually can't make use of PC-style parallel
port hardware are those newer PCIe systems that have no support for I/O
cycles in the host bridge, required by such parallel ports.  Notably,
this includes the s390 arch, which has port I/O accessors that cause
compilation warnings (promoted to errors with `-Werror'), and there are
other cases such as the POWER9 PHB4 device, though this one has variable
port I/O accessors that depend on the particular system.  Also it is not
clear whether the serial port side of devices enabled by PARPORT_SERIAL
uses port I/O or MMIO.  Finally Super I/O solutions are always either
ISA or platform devices.

Make the PARPORT_PC option selectable also for PCI systems then, except
for the s390 arch, however limit the availability of PARPORT_PC_SUPERIO
to platforms that enable ARCH_MIGHT_HAVE_PC_PARPORT.  Update platforms
accordingly for the required <asm/parport.h> header.

Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.2202141955550.34636@angie.orcam.me.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/Kbuild
arch/csky/include/asm/Kbuild
arch/riscv/include/asm/Kbuild
arch/um/include/asm/Kbuild
arch/xtensa/include/asm/Kbuild
drivers/parport/Kconfig

index 64202010b7008ca771006c8aee0995f58d519729..345fe98605ba6cf6d4437937f38cd17c2d1d8d2b 100644 (file)
@@ -3,6 +3,7 @@ generic-y += early_ioremap.h
 generic-y += mcs_spinlock.h
 generic-y += qrwlock.h
 generic-y += qspinlock.h
+generic-y += parport.h
 generic-y += user.h
 
 generated-y += cpucaps.h
index 904a18a818beca58a1605d1d33ba1992275d9896..888248235c23608f0b10af3331c965657c57d40e 100644 (file)
@@ -4,5 +4,6 @@ generic-y += extable.h
 generic-y += gpio.h
 generic-y += kvm_para.h
 generic-y += qrwlock.h
+generic-y += parport.h
 generic-y += user.h
 generic-y += vmlinux.lds.h
index 57b86fd9916c338cc86d0b9e916d6f7a149da23e..5edf5b8587e7d987e38676cde811c735e6e65877 100644 (file)
@@ -2,5 +2,6 @@
 generic-y += early_ioremap.h
 generic-y += flat.h
 generic-y += kvm_para.h
+generic-y += parport.h
 generic-y += user.h
 generic-y += vmlinux.lds.h
index e5a7b552bb38449b590aa9b842b83fdfeec294c3..b08bd29662538de0318894ee871270f448a9c41c 100644 (file)
@@ -17,6 +17,7 @@ generic-y += mcs_spinlock.h
 generic-y += mmiowb.h
 generic-y += module.lds.h
 generic-y += param.h
+generic-y += parport.h
 generic-y += percpu.h
 generic-y += preempt.h
 generic-y += softirq_stack.h
index 854c5e07e86703f4f8681cc51f8751fdcf917bd3..fa07c686cbcc2153776a478ac4093846f01eddab 100644 (file)
@@ -4,6 +4,7 @@ generic-y += extable.h
 generic-y += kvm_para.h
 generic-y += mcs_spinlock.h
 generic-y += param.h
+generic-y += parport.h
 generic-y += qrwlock.h
 generic-y += qspinlock.h
 generic-y += user.h
index e78a9f0302c7e15f8ecc25ee3cdfdcaca4fe13d0..68a4fe4cd60b2a852c9798d12865f5fe3670136e 100644 (file)
@@ -42,7 +42,7 @@ if PARPORT
 
 config PARPORT_PC
        tristate "PC-style hardware"
-       depends on ARCH_MIGHT_HAVE_PC_PARPORT
+       depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390)
        help
          You should say Y here if you have a PC-style parallel port. All
          IBM PC compatible computers and some Alphas have PC-style
@@ -77,7 +77,7 @@ config PARPORT_PC_FIFO
 
 config PARPORT_PC_SUPERIO
        bool "SuperIO chipset support"
-       depends on PARPORT_PC && !PARISC
+       depends on ARCH_MIGHT_HAVE_PC_PARPORT && PARPORT_PC && !PARISC
        help
          Saying Y here enables some probes for Super-IO chipsets in order to
          find out things like base addresses, IRQ lines and DMA channels.  It