kernel_optimize_test/arch/mips/pci
Ilya Lipnitskiy 8dfd7329ad 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 09dd629eea ("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:50:39 +02:00
..
fixup-ath79.c
fixup-bcm63xx.c
fixup-capcella.c
fixup-cobalt.c
fixup-fuloong2e.c
fixup-ip32.c
fixup-jmr3927.c
fixup-lantiq.c
fixup-lemote2f.c
fixup-malta.c
fixup-mpc30x.c
fixup-rbtx4927.c
fixup-rbtx4938.c
fixup-rc32434.c
fixup-sb1250.c
fixup-sni.c
fixup-tb0219.c
fixup-tb0226.c
fixup-tb0287.c
Makefile
msi-octeon.c
msi-xlp.c
ops-bcm63xx.c
ops-bonito64.c
ops-gt64xxx_pci0.c
ops-lantiq.c
ops-loongson2.c
ops-mace.c
ops-msc.c
ops-rc32434.c
ops-sni.c
ops-tx3927.c
ops-tx4927.c
ops-vr41xx.c
pci-alchemy.c
pci-ar71xx.c
pci-ar724x.c
pci-ar2315.c
pci-bcm47xx.c
pci-bcm63xx.c
pci-bcm63xx.h
pci-bcm1480.c
pci-bcm1480ht.c
pci-generic.c
pci-ip27.c
pci-ip32.c
pci-lantiq.c
pci-lantiq.h
pci-legacy.c
pci-malta.c
pci-mt7620.c
pci-octeon.c
pci-rc32434.c
pci-rt2880.c
pci-rt3883.c
pci-sb1250.c
pci-tx4927.c
pci-tx4938.c
pci-tx4939.c
pci-vr41xx.c
pci-vr41xx.h
pci-xlp.c
pci-xlr.c
pci-xtalk-bridge.c
pci.c
pcie-octeon.c