aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/chrp/pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index f6b0c519d5a2..8f67a394b2d0 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -34,7 +34,7 @@ int gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off,
34 int len, u32 *val) 34 int len, u32 *val)
35{ 35{
36 volatile void __iomem *cfg_data; 36 volatile void __iomem *cfg_data;
37 struct pci_controller *hose = bus->sysdata; 37 struct pci_controller *hose = pci_bus_to_host(bus);
38 38
39 if (bus->number > 7) 39 if (bus->number > 7)
40 return PCIBIOS_DEVICE_NOT_FOUND; 40 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -61,7 +61,7 @@ int gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off,
61 int len, u32 val) 61 int len, u32 val)
62{ 62{
63 volatile void __iomem *cfg_data; 63 volatile void __iomem *cfg_data;
64 struct pci_controller *hose = bus->sysdata; 64 struct pci_controller *hose = pci_bus_to_host(bus);
65 65
66 if (bus->number > 7) 66 if (bus->number > 7)
67 return PCIBIOS_DEVICE_NOT_FOUND; 67 return PCIBIOS_DEVICE_NOT_FOUND;
@@ -96,7 +96,7 @@ static struct pci_ops gg2_pci_ops =
96int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset, 96int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
97 int len, u32 *val) 97 int len, u32 *val)
98{ 98{
99 struct pci_controller *hose = bus->sysdata; 99 struct pci_controller *hose = pci_bus_to_host(bus);
100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 100 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
101 | (((bus->number - hose->first_busno) & 0xff) << 16) 101 | (((bus->number - hose->first_busno) & 0xff) << 16)
102 | (hose->global_number << 24); 102 | (hose->global_number << 24);
@@ -111,7 +111,7 @@ int rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
111int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset, 111int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
112 int len, u32 val) 112 int len, u32 val)
113{ 113{
114 struct pci_controller *hose = bus->sysdata; 114 struct pci_controller *hose = pci_bus_to_host(bus);
115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) 115 unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
116 | (((bus->number - hose->first_busno) & 0xff) << 16) 116 | (((bus->number - hose->first_busno) & 0xff) << 16)
117 | (hose->global_number << 24); 117 | (hose->global_number << 24);