aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/tsi108_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/tsi108_pci.c')
-rw-r--r--arch/powerpc/sysdev/tsi108_pci.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c
index 90db8a720fed..31d3d33d91fc 100644
--- a/arch/powerpc/sysdev/tsi108_pci.c
+++ b/arch/powerpc/sysdev/tsi108_pci.c
@@ -52,7 +52,6 @@
52u32 tsi108_pci_cfg_base; 52u32 tsi108_pci_cfg_base;
53static u32 tsi108_pci_cfg_phys; 53static u32 tsi108_pci_cfg_phys;
54u32 tsi108_csr_vir_base; 54u32 tsi108_csr_vir_base;
55static struct device_node *pci_irq_node;
56static struct irq_host *pci_irq_host; 55static struct irq_host *pci_irq_host;
57 56
58extern u32 get_vir_csrbase(void); 57extern u32 get_vir_csrbase(void);
@@ -193,8 +192,8 @@ void tsi108_clear_pci_cfg_error(void)
193} 192}
194 193
195static struct pci_ops tsi108_direct_pci_ops = { 194static struct pci_ops tsi108_direct_pci_ops = {
196 tsi108_direct_read_config, 195 .read = tsi108_direct_read_config,
197 tsi108_direct_write_config 196 .write = tsi108_direct_write_config,
198}; 197};
199 198
200int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary) 199int __init tsi108_setup_pci(struct device_node *dev, u32 cfg_phys, int primary)
@@ -405,13 +404,7 @@ static int pci_irq_host_map(struct irq_host *h, unsigned int virq,
405 return 0; 404 return 0;
406} 405}
407 406
408static int pci_irq_host_match(struct irq_host *h, struct device_node *node)
409{
410 return pci_irq_node == node;
411}
412
413static struct irq_host_ops pci_irq_host_ops = { 407static struct irq_host_ops pci_irq_host_ops = {
414 .match = pci_irq_host_match,
415 .map = pci_irq_host_map, 408 .map = pci_irq_host_map,
416 .xlate = pci_irq_host_xlate, 409 .xlate = pci_irq_host_xlate,
417}; 410};
@@ -433,10 +426,11 @@ void __init tsi108_pci_int_init(struct device_node *node)
433{ 426{
434 DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); 427 DBG("Tsi108_pci_int_init: initializing PCI interrupts\n");
435 428
436 pci_irq_node = of_node_get(node); 429 pci_irq_host = irq_alloc_host(of_node_get(node), IRQ_HOST_MAP_LEGACY,
437 pci_irq_host = irq_alloc_host(IRQ_HOST_MAP_LEGACY, 0, &pci_irq_host_ops, 0); 430 0, &pci_irq_host_ops, 0);
438 if (pci_irq_host == NULL) { 431 if (pci_irq_host == NULL) {
439 printk(KERN_ERR "pci_irq_host: failed to allocate irq host !\n"); 432 printk(KERN_ERR "pci_irq_host: failed to allocate irq host !\n");
433 of_node_put(node);
440 return; 434 return;
441 } 435 }
442 436