aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2009-04-29 23:10:08 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-05-21 01:44:22 -0400
commit8206a110cbaa029570d037c0aeafeb181443b6b8 (patch)
treeee9cd4c151536a90a7eda080fae123db75f1b922 /arch
parent19afa40797a3b392b64bf0b30b46e62001eeb66f (diff)
powerpc/pci: Clean up direct access to sysdata by FSL platforms
We shouldn't directly access sysdata to get the pci_controller. Instead use pci_bus_to_host() for this purpose. In the future we might have sysdata be a device_node to match ppc64 and unify the code between ppc32 & ppc64. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 0de91c62e3d2..ae88b1448018 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -284,7 +284,7 @@ static void __init setup_pci_cmd(struct pci_controller *hose)
284 284
285void fsl_pcibios_fixup_bus(struct pci_bus *bus) 285void fsl_pcibios_fixup_bus(struct pci_bus *bus)
286{ 286{
287 struct pci_controller *hose = (struct pci_controller *) bus->sysdata; 287 struct pci_controller *hose = pci_bus_to_host(bus);
288 int i; 288 int i;
289 289
290 if ((bus->parent == hose->bus) && 290 if ((bus->parent == hose->bus) &&
@@ -422,7 +422,7 @@ struct mpc83xx_pcie_priv {
422 422
423static int mpc83xx_pcie_exclude_device(struct pci_bus *bus, unsigned int devfn) 423static int mpc83xx_pcie_exclude_device(struct pci_bus *bus, unsigned int devfn)
424{ 424{
425 struct pci_controller *hose = bus->sysdata; 425 struct pci_controller *hose = pci_bus_to_host(bus);
426 426
427 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK) 427 if (hose->indirect_type & PPC_INDIRECT_TYPE_NO_PCIE_LINK)
428 return PCIBIOS_DEVICE_NOT_FOUND; 428 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -448,7 +448,7 @@ static int mpc83xx_pcie_exclude_device(struct pci_bus *bus, unsigned int devfn)
448static void __iomem *mpc83xx_pcie_remap_cfg(struct pci_bus *bus, 448static void __iomem *mpc83xx_pcie_remap_cfg(struct pci_bus *bus,
449 unsigned int devfn, int offset) 449 unsigned int devfn, int offset)
450{ 450{
451 struct pci_controller *hose = bus->sysdata; 451 struct pci_controller *hose = pci_bus_to_host(bus);
452 struct mpc83xx_pcie_priv *pcie = hose->dn->data; 452 struct mpc83xx_pcie_priv *pcie = hose->dn->data;
453 u8 bus_no = bus->number - hose->first_busno; 453 u8 bus_no = bus->number - hose->first_busno;
454 u32 dev_base = bus_no << 24 | devfn << 16; 454 u32 dev_base = bus_no << 24 | devfn << 16;