aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-08-03 10:38:44 -0400
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>2018-08-08 10:50:04 -0400
commitdfd0309fd7b30a5baffaf47b2fccb88b46d64d69 (patch)
treef288ce404127906f082f3b7fba713085106aee19 /drivers/pci/controller
parent6554f9501915101ba89aab6e40c83139d23f853a (diff)
PCI: mvebu: Fix I/O space end address calculation
pcie->realio.end should be the address of last byte of the area, therefore using resource_size() of another resource is not correct, we must substract 1 to get the address of the last byte. Fixes: 11be65472a427 ("PCI: mvebu: Adapt to the new device tree layout") Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r--drivers/pci/controller/pci-mvebu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c
index 38fa2d08527d..a195592723c2 100644
--- a/drivers/pci/controller/pci-mvebu.c
+++ b/drivers/pci/controller/pci-mvebu.c
@@ -1219,7 +1219,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
1219 pcie->realio.start = PCIBIOS_MIN_IO; 1219 pcie->realio.start = PCIBIOS_MIN_IO;
1220 pcie->realio.end = min_t(resource_size_t, 1220 pcie->realio.end = min_t(resource_size_t,
1221 IO_SPACE_LIMIT, 1221 IO_SPACE_LIMIT,
1222 resource_size(&pcie->io)); 1222 resource_size(&pcie->io) - 1);
1223 } else 1223 } else
1224 pcie->realio = pcie->io; 1224 pcie->realio = pcie->io;
1225 1225