linux-brain/arch/mips/pci
Ilya Lipnitskiy bdad13dd15 MIPS: pci-legacy: stop using of_pci_range_to_resource
[ Upstream commit 3ecb9dc1581eebecaee56decac70e35365260866 ]

Mirror commit aeba3731b1 ("powerpc/pci: Fix IO space breakage after
of_pci_range_to_resource() change").

Most MIPS platforms do not define PCI_IOBASE, nor implement
pci_address_to_pio(). Moreover, IO_SPACE_LIMIT is 0xffff for most MIPS
platforms. of_pci_range_to_resource passes the _start address_ of the IO
range into pci_address_to_pio, which then checks it against
IO_SPACE_LIMIT and fails, because for MIPS platforms that use
pci-legacy (pci-lantiq, pci-rt3883, pci-mt7620), IO ranges start much
higher than 0xffff.

In fact, pci-mt7621 in staging already works around this problem, see
commit 09dd629eeabb ("staging: mt7621-pci: fix io space and properly set
resource limits")

So just stop using of_pci_range_to_resource, which does not work for
MIPS.

Fixes PCI errors like:
  pci_bus 0000:00: root bus resource [io  0xffffffff]

Fixes: 0b0b0893d4 ("of/pci: Fix the conversion of IO ranges into IO resources")
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Cc: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:44:30 +02:00
..
Makefile MIPS: SGI-IP27: use generic PCI driver 2019-05-09 16:39:27 -07:00
fixup-ath79.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fixup-bcm63xx.c MIPS: BCM63xx: Add support for the Broadcom BCM63xx family of SOCs. 2009-09-17 20:07:52 +02:00
fixup-capcella.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-cobalt.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-emma2rh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-fuloong2e.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-ip32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fixup-jmr3927.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fixup-lemote2f.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-loongson3.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-malta.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fixup-mpc30x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-pmcmsp.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-rbtx4927.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-rbtx4938.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-rc32434.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
fixup-sb1250.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fixup-sni.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
fixup-tb0219.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-tb0226.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
fixup-tb0287.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
msi-octeon.c Disable MSI also when pcie-octeon.pcie_disable on 2019-01-10 10:57:13 -08:00
msi-xlp.c MIPS: Netlogic: Use chip_data for irq_chip methods 2015-09-03 12:08:03 +02:00
ops-bcm63xx.c MIPS: BCM63XX: Mark expected switch fall-through 2019-08-05 18:25:30 -07:00
ops-bonito64.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-emma2rh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 352 2019-06-05 17:37:09 +02:00
ops-loongson3.c MIPS/PCI: Let Loongson-3 pci_ops access extended config space 2018-09-19 18:57:30 -07:00
ops-mace.c PCI: Remove unnecessary #includes of <asm/pci.h> 2015-06-08 07:56:09 -05:00
ops-msc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
ops-nile4.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ops-pmcmsp.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ops-rc32434.c mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
ops-sni.c MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
ops-tx3927.c mips: Update the email address of Geert Uytterhoeven 2014-06-02 16:34:41 +02:00
ops-tx4927.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ops-vr41xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-alchemy.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-ar71xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-ar724x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-ar2315.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
pci-bcm47xx.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-bcm63xx.c MIPS: BCM63XX: add support for BCM3368 Cable Modem 2013-07-01 15:10:53 +02:00
pci-bcm63xx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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-emma2rh.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-generic.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pci-ip27.c MIPS: SGI-IP27: use generic PCI driver 2019-05-09 16:39:27 -07:00
pci-ip32.c MIPS: make PCI_DMA_BUS_IS_PHYS=1 constant 2016-05-13 14:02:17 +02:00
pci-lantiq.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-lantiq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pci-lasat.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-legacy.c MIPS: pci-legacy: stop using of_pci_range_to_resource 2021-05-14 09:44:30 +02:00
pci-malta.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 182 2019-05-30 11:29:20 -07:00
pci-mt7620.c MIPS: pci-mt7620: fix PLL lock check 2021-05-14 09:44:11 +02:00
pci-octeon.c MIPS: OCTEON: don't set octeon_dma_bar_type if PCI is disabled 2019-01-29 11:47:02 -08:00
pci-rc32434.c MIPS: RC32434: fix broken PCI resource initialization 2014-05-26 09:02:06 +02:00
pci-rt2880.c MIPS: pci-rt2880: fix slot 0 configuration 2021-05-14 09:44:12 +02:00
pci-rt3883.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +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 MIPS: TXx9: Modernize printing of kernel messages 2017-01-03 16:34:32 +01:00
pci-tx4938.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-tx4939.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-virtio-guest.c MIPS: paravirt: Add pci controller for virtio 2014-06-02 12:34:20 +02:00
pci-vr41xx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-vr41xx.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pci-xlp.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-xlr.c MIPS: PCI: Move map_irq() hooks out of initdata 2017-09-19 14:55:26 -05:00
pci-xtalk-bridge.c MIPS: PCI: Fix MIPS build 2020-11-22 10:14:11 +01:00
pci.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
pcie-octeon.c MIPS: Octeon: Unify QLM data types in CIU header. 2018-07-03 16:00:43 -07:00