powerpc/PCI: convert devtree bus addresses to resource
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 16 Mar 2012 23:48:14 +0000 (17:48 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 20 Mar 2012 17:41:51 +0000 (10:41 -0700)
commit39aa146aad3711317baa661e6c421e979c432f2d
tree9900cb0d8de115dec5e4f9d0214c423ac848f0e8
parent38973ba7903fa0660a31b2bdc50ff711ec8d08c9
powerpc/PCI: convert devtree bus addresses to resource

Normal PCI enumeration via PCI config space uses __pci_read_base(), where
the PCI core applies any bus-to-resource offset.  But powerpc doesn't use
that path when enumerating via the device tree.

In 6c5705fec63d, I converted powerpc to use the PCI core bus-to-resource
conversion, but I missed these powerpc-specific paths.  Some powerpc
platforms fail to boot ("Cannot allocate resource region," "device not
available," etc.) between that commit and this one.

This adds the corresponding bus-to-resource conversion in the paths that
read BAR values from the OF device tree.

CC: Anton Blanchard <anton@samba.org>
CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
arch/powerpc/kernel/pci_of_scan.c