diff options
Diffstat (limited to 'arch/powerpc/sysdev/tsi108_pci.c')
-rw-r--r-- | arch/powerpc/sysdev/tsi108_pci.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index 58b9e7f8abf2..2153163fa593 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/machdep.h> | 35 | #include <asm/machdep.h> |
36 | #include <asm/pci-bridge.h> | 36 | #include <asm/pci-bridge.h> |
37 | #include <asm/tsi108.h> | 37 | #include <asm/tsi108.h> |
38 | #include <asm/tsi108_pci.h> | ||
38 | #include <asm/tsi108_irq.h> | 39 | #include <asm/tsi108_irq.h> |
39 | #include <asm/prom.h> | 40 | #include <asm/prom.h> |
40 | 41 | ||
@@ -49,6 +50,7 @@ | |||
49 | ((((bus)<<16) | ((devfunc)<<8) | (offset & 0xfc)) + tsi108_pci_cfg_base) | 50 | ((((bus)<<16) | ((devfunc)<<8) | (offset & 0xfc)) + tsi108_pci_cfg_base) |
50 | 51 | ||
51 | u32 tsi108_pci_cfg_base; | 52 | u32 tsi108_pci_cfg_base; |
53 | static u32 tsi108_pci_cfg_phys; | ||
52 | u32 tsi108_csr_vir_base; | 54 | u32 tsi108_csr_vir_base; |
53 | static struct device_node *pci_irq_node; | 55 | static struct device_node *pci_irq_node; |
54 | static struct irq_host *pci_irq_host; | 56 | static struct irq_host *pci_irq_host; |
@@ -185,7 +187,7 @@ tsi108_direct_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
185 | 187 | ||
186 | void tsi108_clear_pci_cfg_error(void) | 188 | void tsi108_clear_pci_cfg_error(void) |
187 | { | 189 | { |
188 | tsi108_clear_pci_error(TSI108_PCI_CFG_BASE_PHYS); | 190 | tsi108_clear_pci_error(tsi108_pci_cfg_phys); |
189 | } | 191 | } |
190 | 192 | ||
191 | static struct pci_ops tsi108_direct_pci_ops = { | 193 | static struct pci_ops tsi108_direct_pci_ops = { |
@@ -193,17 +195,17 @@ static struct pci_ops tsi108_direct_pci_ops = { | |||
193 | tsi108_direct_write_config | 195 | tsi108_direct_write_config |
194 | }; | 196 | }; |
195 | 197 | ||
196 | int __init tsi108_setup_pci(struct device_node *dev) | 198 | int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary) |
197 | { | 199 | { |
198 | int len; | 200 | int len; |
199 | struct pci_controller *hose; | 201 | struct pci_controller *hose; |
200 | struct resource rsrc; | 202 | struct resource rsrc; |
201 | const int *bus_range; | 203 | const int *bus_range; |
202 | int primary = 0, has_address = 0; | 204 | int has_address = 0; |
203 | 205 | ||
204 | /* PCI Config mapping */ | 206 | /* PCI Config mapping */ |
205 | tsi108_pci_cfg_base = (u32)ioremap(TSI108_PCI_CFG_BASE_PHYS, | 207 | tsi108_pci_cfg_base = (u32)ioremap(cfg_phys, TSI108_PCI_CFG_SIZE); |
206 | TSI108_PCI_CFG_SIZE); | 208 | tsi108_pci_cfg_phys = cfg_phys; |
207 | DBG("TSI_PCI: %s tsi108_pci_cfg_base=0x%x\n", __FUNCTION__, | 209 | DBG("TSI_PCI: %s tsi108_pci_cfg_base=0x%x\n", __FUNCTION__, |
208 | tsi108_pci_cfg_base); | 210 | tsi108_pci_cfg_base); |
209 | 211 | ||