linux/arch/mips/pci
Ilpo Järvinen f294a5fd34 MIPS: Malta: Use pcibios_align_resource() to block io range
According to Maciej W. Rozycki <macro@orcam.me.uk>, the
mips_pcibios_init() for malta adjusts root bus IO resource start
address to prevent interfering with PIIX4 I/O cycle decoding. Adjusting
lower bound leaves PIIX4 IO resources outside of the root bus resource
and assign_fixed_resource_on_bus() does not link the resources into the
resource tree.

Prior to commit ae81aad5c2 ("MIPS: PCI: Use pci_enable_resources()") the
arch specific pcibios_enable_resources() did not check if the resources
were assigned which diverges from what PCI core checks, effectively hiding
the PIIX4 IO resources were not properly within the resource tree. After
starting to use pcibios_enable_resources() from PCI core, enabling PIIX4
fails:

  ata_piix 0000:00:0a.1: BAR 0 [io  0x01f0-0x01f7]: not claimed; can't enable device
  ata_piix 0000:00:0a.1: probe with driver ata_piix failed with error -22

MIPS PCI code already has support for enforcing lower bounds using
PCIBIOS_MIN_IO in pcibios_align_resource() without altering the IO window
start address itself. Make malta PCI code too to use PCIBIOS_MIN_IO.

Fixes: ae81aad5c2 ("MIPS: PCI: Use pci_enable_resources()")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/linux-pci/9085ab12-1559-4462-9b18-f03dcb9a4088@roeck-us.net/
Suggested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/linux-pci/alpine.DEB.2.21.2510132229120.39634@angie.orcam.me.uk/
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Maciej W. Rozycki <macro@orcam.me.uk>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Link: https://patch.msgid.link/20251017110903.1973-1-ilpo.jarvinen@linux.intel.com
2025-10-22 11:06:31 -05:00
..
fixup-ath79.c MIPS: ath79: Don't return PCIBIOS_* code from pcibios_enable_device() 2024-02-20 13:36:35 +01:00
fixup-bcm63xx.c
fixup-cobalt.c MIPS: Cobalt: Explain GT64111 early PCI fixup 2021-11-03 17:34:11 +01:00
fixup-fuloong2e.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-ip32.c
fixup-lantiq.c MIPS: lantiq: Remove unused function pointer variables 2024-02-20 13:36:34 +01:00
fixup-lemote2f.c MIPS: PCI: Remove leading space in info message, rename pci 2022-07-05 11:10:34 +02:00
fixup-malta.c
fixup-rbtx4927.c
fixup-rc32434.c
fixup-sb1250.c PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
fixup-sni.c MIPS: Use fallthrough for arch/mips 2020-05-07 11:55:47 +02:00
Makefile MIPS: Remove VR41xx support 2022-07-14 11:52:29 +02:00
msi-octeon.c MIPS: msi-octeon: eliminate kernel-doc warnings 2022-07-30 10:58:26 +02:00
ops-bcm63xx.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
ops-bonito64.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-gt64xxx_pci0.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ops-loongson2.c MIPS: Fix typos 2024-01-08 10:39:12 +01:00
ops-mace.c
ops-msc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-rc32434.c MIPS: Routerboard 532: Fix vendor retry check code 2024-06-11 16:04:55 +02:00
ops-sni.c
ops-tx4927.c MIPS: TXx9: Use PCI_SET_ERROR_RESPONSE() 2024-02-20 13:36:35 +01:00
pci-alchemy.c MIPS: Fix typos 2024-01-08 10:39:12 +01:00
pci-ar71xx.c MIPS: pci: use devm_platform_ioremap_resource_byname 2020-09-18 15:29:35 +02:00
pci-ar724x.c MIPS: pci: use devm_platform_ioremap_resource_byname 2020-09-18 15:29:35 +02:00
pci-ar2315.c MIPS: Switch to irq_domain_create_*() 2025-05-16 21:06:10 +02:00
pci-bcm47xx.c bcm47xx: Replace printk(KERN_ALERT ... pci_devname(dev)) with pci_alert() 2021-10-18 18:11:15 +02:00
pci-bcm63xx.c PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
pci-bcm63xx.h
pci-bcm1480.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-bcm1480ht.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-generic.c MIPS: Only define pci_remap_iospace() for Ralink 2021-12-09 10:22:24 +01:00
pci-ip27.c mips: add <asm-generic/io.h> including 2023-11-23 10:32:52 +01:00
pci-ip32.c
pci-lantiq.c MIPS: pci: lantiq: marks pcibios_init() as static 2025-07-02 13:36:41 +02:00
pci-lantiq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-legacy.c MIPS: PCI: Use pci_enable_resources() 2025-09-16 11:18:50 -05:00
pci-malta.c MIPS: Malta: Use pcibios_align_resource() to block io range 2025-10-22 11:06:31 -05:00
pci-mt7620.c mips: pci-mt7620: use dev_info() to log PCIe device detection result 2023-06-21 14:53:45 +02:00
pci-octeon.c MIPS: Fix typos 2024-01-08 10:39:12 +01:00
pci-rc32434.c
pci-rt2880.c MIPS: pci-rt2880: make pcibios_init() static 2025-07-02 13:29:34 +02:00
pci-rt3883.c MIPS: Switch to irq_domain_create_*() 2025-05-16 21:06:10 +02:00
pci-sb1250.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-tx4927.c
pci-tx4938.c
pci-xtalk-bridge.c irqdomain: Rename irq_get_default_host() to irq_get_default_domain() 2025-04-04 16:39:10 +02:00
pci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pcie-octeon.c MIPS: Octeron: remove source file executable bit 2024-07-09 10:38:08 +02:00