aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authoroftedal <oftedal@gmail.com>2013-10-18 22:28:29 +0200
committerBen Hutchings <ben@decadent.org.uk>2014-04-30 16:23:18 +0100
commit0fc0d40baf275f99cb635fb65af19a977e7ecd2a (patch)
tree3ca37b877ab598a43244303c8afd90998d517fcb /arch
parent710da494970f1d73c7df3fc0997e565cf4396e9d (diff)
sparc: PCI: Fix incorrect address calculation of PCI Bridge windows on Simba-bridges
[ Upstream commit 557fc5873ef178c4b3e1e36a42db547ecdc43f9b ] The SIMBA APB Bridges lacks the 'ranges' of-property describing the PCI I/O and memory areas located beneath the bridge. Faking this information has been performed by reading range registers in the APB bridge, and calculating the corresponding areas. In commit 01f94c4a6ced476ce69b895426fc29bfc48c69bd ("Fix sabre pci controllers with new probing scheme.") a bug was introduced into this calculation, causing the PCI memory areas to be calculated incorrectly: The shift size was set to be identical for I/O and MEM ranges, which is incorrect. This patch set the shift size of the MEM range back to the value used before 01f94c4a6ced476ce69b895426fc29bfc48c69bd. Signed-off-by: Kjetil Oftedal <oftedal@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/kernel/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 31111e35281..656b5b60493 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -487,8 +487,8 @@ static void __devinit apb_fake_ranges(struct pci_dev *dev,
pci_read_config_byte(dev, APB_MEM_ADDRESS_MAP, &map);
apb_calc_first_last(map, &first, &last);
res = bus->resource[1];
- res->start = (first << 21);
- res->end = (last << 21) + ((1 << 21) - 1);
+ res->start = (first << 29);
+ res->end = (last << 29) + ((1 << 29) - 1);
res->flags = IORESOURCE_MEM;
pci_resource_adjust(res, &pbm->mem_space);
}