Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

parport_pc: Also enable driver for PCI systems

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>

authored by

Maciej W. Rozycki and committed by
Greg Kroah-Hartman
66bcd060 e0de88dc

+7 -2
+1
arch/arm64/include/asm/Kbuild
··· 3 3 generic-y += mcs_spinlock.h 4 4 generic-y += qrwlock.h 5 5 generic-y += qspinlock.h 6 + generic-y += parport.h 6 7 generic-y += user.h 7 8 8 9 generated-y += cpucaps.h
+1
arch/csky/include/asm/Kbuild
··· 4 4 generic-y += gpio.h 5 5 generic-y += kvm_para.h 6 6 generic-y += qrwlock.h 7 + generic-y += parport.h 7 8 generic-y += user.h 8 9 generic-y += vmlinux.lds.h
+1
arch/riscv/include/asm/Kbuild
··· 2 2 generic-y += early_ioremap.h 3 3 generic-y += flat.h 4 4 generic-y += kvm_para.h 5 + generic-y += parport.h 5 6 generic-y += user.h 6 7 generic-y += vmlinux.lds.h
+1
arch/um/include/asm/Kbuild
··· 17 17 generic-y += mmiowb.h 18 18 generic-y += module.lds.h 19 19 generic-y += param.h 20 + generic-y += parport.h 20 21 generic-y += percpu.h 21 22 generic-y += preempt.h 22 23 generic-y += softirq_stack.h
+1
arch/xtensa/include/asm/Kbuild
··· 4 4 generic-y += kvm_para.h 5 5 generic-y += mcs_spinlock.h 6 6 generic-y += param.h 7 + generic-y += parport.h 7 8 generic-y += qrwlock.h 8 9 generic-y += qspinlock.h 9 10 generic-y += user.h
+2 -2
drivers/parport/Kconfig
··· 42 42 43 43 config PARPORT_PC 44 44 tristate "PC-style hardware" 45 - depends on ARCH_MIGHT_HAVE_PC_PARPORT 45 + depends on ARCH_MIGHT_HAVE_PC_PARPORT || (PCI && !S390) 46 46 help 47 47 You should say Y here if you have a PC-style parallel port. All 48 48 IBM PC compatible computers and some Alphas have PC-style ··· 77 77 78 78 config PARPORT_PC_SUPERIO 79 79 bool "SuperIO chipset support" 80 - depends on PARPORT_PC && !PARISC 80 + depends on ARCH_MIGHT_HAVE_PC_PARPORT && PARPORT_PC && !PARISC 81 81 help 82 82 Saying Y here enables some probes for Super-IO chipsets in order to 83 83 find out things like base addresses, IRQ lines and DMA channels. It