aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/sysdev/indirect_pci.c17
-rw-r--r--include/asm-powerpc/pci-bridge.h2
2 files changed, 4 insertions, 15 deletions
diff --git a/arch/powerpc/sysdev/indirect_pci.c b/arch/powerpc/sysdev/indirect_pci.c
index bc5b4e22fa5d..ad341f5ff94f 100644
--- a/arch/powerpc/sysdev/indirect_pci.c
+++ b/arch/powerpc/sysdev/indirect_pci.c
@@ -149,24 +149,15 @@ static struct pci_ops indirect_pci_ops =
149}; 149};
150 150
151void __init 151void __init
152setup_indirect_pci_nomap(struct pci_controller* hose, void __iomem * cfg_addr,
153 void __iomem * cfg_data)
154{
155 hose->cfg_addr = cfg_addr;
156 hose->cfg_data = cfg_data;
157 hose->ops = &indirect_pci_ops;
158}
159
160void __init
161setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data) 152setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
162{ 153{
163 unsigned long base = cfg_addr & PAGE_MASK; 154 unsigned long base = cfg_addr & PAGE_MASK;
164 void __iomem *mbase, *addr, *data; 155 void __iomem *mbase;
165 156
166 mbase = ioremap(base, PAGE_SIZE); 157 mbase = ioremap(base, PAGE_SIZE);
167 addr = mbase + (cfg_addr & ~PAGE_MASK); 158 hose->cfg_addr = mbase + (cfg_addr & ~PAGE_MASK);
168 if ((cfg_data & PAGE_MASK) != base) 159 if ((cfg_data & PAGE_MASK) != base)
169 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE); 160 mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
170 data = mbase + (cfg_data & ~PAGE_MASK); 161 hose->cfg_data = mbase + (cfg_data & ~PAGE_MASK);
171 setup_indirect_pci_nomap(hose, addr, data); 162 hose->ops = &indirect_pci_ops;
172} 163}
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h
index 975435743031..13cb0a973478 100644
--- a/include/asm-powerpc/pci-bridge.h
+++ b/include/asm-powerpc/pci-bridge.h
@@ -87,8 +87,6 @@ int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn,
87extern int early_find_capability(struct pci_controller *hose, int bus, 87extern int early_find_capability(struct pci_controller *hose, int bus,
88 int dev_fn, int cap); 88 int dev_fn, int cap);
89 89
90extern void setup_indirect_pci_nomap(struct pci_controller* hose,
91 void __iomem *cfg_addr, void __iomem *cfg_data);
92extern void setup_indirect_pci(struct pci_controller* hose, 90extern void setup_indirect_pci(struct pci_controller* hose,
93 u32 cfg_addr, u32 cfg_data); 91 u32 cfg_addr, u32 cfg_data);
94extern void setup_grackle(struct pci_controller *hose); 92extern void setup_grackle(struct pci_controller *hose);