ata: add HAS_IOPORT dependencies

In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at
compile time. We thus need to add HAS_IOPORT as dependency for those
drivers using them.

Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
This commit is contained in:
Niklas Schnelle 2024-04-04 11:29:36 +02:00 committed by Damien Le Moal
parent dcf2653ac1
commit 21a6f37d88
2 changed files with 18 additions and 14 deletions

View file

@ -556,7 +556,7 @@ comment "PATA SFF controllers with BMDMA"
config PATA_ALI config PATA_ALI
tristate "ALi PATA support" tristate "ALi PATA support"
depends on PCI depends on PCI && HAS_IOPORT
select PATA_TIMINGS select PATA_TIMINGS
help help
This option enables support for the ALi ATA interfaces This option enables support for the ALi ATA interfaces
@ -566,7 +566,7 @@ config PATA_ALI
config PATA_AMD config PATA_AMD
tristate "AMD/NVidia PATA support" tristate "AMD/NVidia PATA support"
depends on PCI depends on PCI && HAS_IOPORT
select PATA_TIMINGS select PATA_TIMINGS
help help
This option enables support for the AMD and NVidia PATA This option enables support for the AMD and NVidia PATA
@ -584,7 +584,7 @@ config PATA_ARASAN_CF
config PATA_ARTOP config PATA_ARTOP
tristate "ARTOP 6210/6260 PATA support" tristate "ARTOP 6210/6260 PATA support"
depends on PCI depends on PCI && HAS_IOPORT
help help
This option enables support for ARTOP PATA controllers. This option enables support for ARTOP PATA controllers.
@ -611,7 +611,7 @@ config PATA_ATP867X
config PATA_CMD64X config PATA_CMD64X
tristate "CMD64x PATA support" tristate "CMD64x PATA support"
depends on PCI depends on PCI && HAS_IOPORT
select PATA_TIMINGS select PATA_TIMINGS
help help
This option enables support for the CMD64x series chips This option enables support for the CMD64x series chips
@ -658,7 +658,7 @@ config PATA_CS5536
config PATA_CYPRESS config PATA_CYPRESS
tristate "Cypress CY82C693 PATA support (Very Experimental)" tristate "Cypress CY82C693 PATA support (Very Experimental)"
depends on PCI depends on PCI && HAS_IOPORT
select PATA_TIMINGS select PATA_TIMINGS
help help
This option enables support for the Cypress/Contaq CY82C693 This option enables support for the Cypress/Contaq CY82C693
@ -706,7 +706,7 @@ config PATA_HPT366
config PATA_HPT37X config PATA_HPT37X
tristate "HPT 370/370A/371/372/374/302 PATA support" tristate "HPT 370/370A/371/372/374/302 PATA support"
depends on PCI depends on PCI && HAS_IOPORT
help help
This option enables support for the majority of the later HPT This option enables support for the majority of the later HPT
PATA controllers via the new ATA layer. PATA controllers via the new ATA layer.
@ -715,7 +715,7 @@ config PATA_HPT37X
config PATA_HPT3X2N config PATA_HPT3X2N
tristate "HPT 371N/372N/302N PATA support" tristate "HPT 371N/372N/302N PATA support"
depends on PCI depends on PCI && HAS_IOPORT
help help
This option enables support for the N variant HPT PATA This option enables support for the N variant HPT PATA
controllers via the new ATA layer. controllers via the new ATA layer.
@ -818,7 +818,7 @@ config PATA_MPC52xx
config PATA_NETCELL config PATA_NETCELL
tristate "NETCELL Revolution RAID support" tristate "NETCELL Revolution RAID support"
depends on PCI depends on PCI && HAS_IOPORT
help help
This option enables support for the Netcell Revolution RAID This option enables support for the Netcell Revolution RAID
PATA controller. PATA controller.
@ -854,7 +854,7 @@ config PATA_OLDPIIX
config PATA_OPTIDMA config PATA_OPTIDMA
tristate "OPTI FireStar PATA support (Very Experimental)" tristate "OPTI FireStar PATA support (Very Experimental)"
depends on PCI depends on PCI && HAS_IOPORT
help help
This option enables DMA/PIO support for the later OPTi This option enables DMA/PIO support for the later OPTi
controllers found on some old motherboards and in some controllers found on some old motherboards and in some
@ -864,7 +864,7 @@ config PATA_OPTIDMA
config PATA_PDC2027X config PATA_PDC2027X
tristate "Promise PATA 2027x support" tristate "Promise PATA 2027x support"
depends on PCI depends on PCI && HAS_IOPORT
help help
This option enables support for Promise PATA pdc20268 to pdc20277 host adapters. This option enables support for Promise PATA pdc20268 to pdc20277 host adapters.
@ -872,7 +872,7 @@ config PATA_PDC2027X
config PATA_PDC_OLD config PATA_PDC_OLD
tristate "Older Promise PATA controller support" tristate "Older Promise PATA controller support"
depends on PCI depends on PCI && HAS_IOPORT
help help
This option enables support for the Promise 20246, 20262, 20263, This option enables support for the Promise 20246, 20262, 20263,
20265 and 20267 adapters. 20265 and 20267 adapters.
@ -900,7 +900,7 @@ config PATA_RDC
config PATA_SC1200 config PATA_SC1200
tristate "SC1200 PATA support" tristate "SC1200 PATA support"
depends on PCI && (X86_32 || COMPILE_TEST) depends on PCI && (X86_32 || COMPILE_TEST) && HAS_IOPORT
help help
This option enables support for the NatSemi/AMD SC1200 SoC This option enables support for the NatSemi/AMD SC1200 SoC
companion chip used with the Geode processor family. companion chip used with the Geode processor family.
@ -918,7 +918,7 @@ config PATA_SCH
config PATA_SERVERWORKS config PATA_SERVERWORKS
tristate "SERVERWORKS OSB4/CSB5/CSB6/HT1000 PATA support" tristate "SERVERWORKS OSB4/CSB5/CSB6/HT1000 PATA support"
depends on PCI depends on PCI && HAS_IOPORT
help help
This option enables support for the Serverworks OSB4/CSB5/CSB6 and This option enables support for the Serverworks OSB4/CSB5/CSB6 and
HT1000 PATA controllers, via the new ATA layer. HT1000 PATA controllers, via the new ATA layer.
@ -1182,7 +1182,7 @@ config ATA_GENERIC
config PATA_LEGACY config PATA_LEGACY
tristate "Legacy ISA PATA support (Experimental)" tristate "Legacy ISA PATA support (Experimental)"
depends on (ISA || PCI) depends on (ISA || PCI) && HAS_IOPORT
select PATA_TIMINGS select PATA_TIMINGS
help help
This option enables support for ISA/VLB/PCI bus legacy PATA This option enables support for ISA/VLB/PCI bus legacy PATA

View file

@ -3032,6 +3032,7 @@ EXPORT_SYMBOL_GPL(ata_bmdma_port_start32);
*/ */
int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev) int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev)
{ {
#ifdef CONFIG_HAS_IOPORT
unsigned long bmdma = pci_resource_start(pdev, 4); unsigned long bmdma = pci_resource_start(pdev, 4);
u8 simplex; u8 simplex;
@ -3044,6 +3045,9 @@ int ata_pci_bmdma_clear_simplex(struct pci_dev *pdev)
if (simplex & 0x80) if (simplex & 0x80)
return -EOPNOTSUPP; return -EOPNOTSUPP;
return 0; return 0;
#else
return -ENOENT;
#endif /* CONFIG_HAS_IOPORT */
} }
EXPORT_SYMBOL_GPL(ata_pci_bmdma_clear_simplex); EXPORT_SYMBOL_GPL(ata_pci_bmdma_clear_simplex);