diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_pic.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/82xx/mpc82xx_ads.c | 7 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/axon_msi.c | 14 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/interrupt.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spider-pic.c | 18 | ||||
-rw-r--r-- | arch/powerpc/platforms/celleb/interrupt.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/irq.c | 3 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pic.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/interrupt.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/xics.c | 2 |
10 files changed, 23 insertions, 34 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c index 8c464c55b5d0..1d793e4b8d56 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c | |||
@@ -244,7 +244,7 @@ static struct irq_chip mpc52xx_sdma_irqchip = { | |||
244 | static int mpc52xx_irqhost_match(struct irq_host *h, struct device_node *node) | 244 | static int mpc52xx_irqhost_match(struct irq_host *h, struct device_node *node) |
245 | { | 245 | { |
246 | pr_debug("%s: node=%p\n", __func__, node); | 246 | pr_debug("%s: node=%p\n", __func__, node); |
247 | return mpc52xx_irqhost->host_data == node; | 247 | return h->of_node == node; |
248 | } | 248 | } |
249 | 249 | ||
250 | static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct, | 250 | static int mpc52xx_irqhost_xlate(struct irq_host *h, struct device_node *ct, |
@@ -419,14 +419,13 @@ void __init mpc52xx_init_irq(void) | |||
419 | * hw irq information provided by the ofw to linux virq | 419 | * hw irq information provided by the ofw to linux virq |
420 | */ | 420 | */ |
421 | 421 | ||
422 | mpc52xx_irqhost = irq_alloc_host(IRQ_HOST_MAP_LINEAR, | 422 | mpc52xx_irqhost = irq_alloc_host(picnode, IRQ_HOST_MAP_LINEAR, |
423 | MPC52xx_IRQ_HIGHTESTHWIRQ, | 423 | MPC52xx_IRQ_HIGHTESTHWIRQ, |
424 | &mpc52xx_irqhost_ops, -1); | 424 | &mpc52xx_irqhost_ops, -1); |
425 | 425 | ||
426 | if (!mpc52xx_irqhost) | 426 | if (!mpc52xx_irqhost) |
427 | panic(__FILE__ ": Cannot allocate the IRQ host\n"); | 427 | panic(__FILE__ ": Cannot allocate the IRQ host\n"); |
428 | 428 | ||
429 | mpc52xx_irqhost->host_data = picnode; | ||
430 | printk(KERN_INFO "MPC52xx PIC is up and running!\n"); | 429 | printk(KERN_INFO "MPC52xx PIC is up and running!\n"); |
431 | } | 430 | } |
432 | 431 | ||
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c index c0a0c56ac5b3..91ddbd2f477d 100644 --- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c +++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c | |||
@@ -61,7 +61,6 @@ static struct { | |||
61 | 61 | ||
62 | static unsigned long pci_int_base; | 62 | static unsigned long pci_int_base; |
63 | static struct irq_host *pci_pic_host; | 63 | static struct irq_host *pci_pic_host; |
64 | static struct device_node *pci_pic_node; | ||
65 | #endif | 64 | #endif |
66 | 65 | ||
67 | static void __init mpc82xx_ads_pic_init(void) | 66 | static void __init mpc82xx_ads_pic_init(void) |
@@ -401,7 +400,7 @@ m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc) | |||
401 | 400 | ||
402 | static int pci_pic_host_match(struct irq_host *h, struct device_node *node) | 401 | static int pci_pic_host_match(struct irq_host *h, struct device_node *node) |
403 | { | 402 | { |
404 | return node == pci_pic_node; | 403 | return h->of_node == node; |
405 | } | 404 | } |
406 | 405 | ||
407 | static int pci_pic_host_map(struct irq_host *h, unsigned int virq, | 406 | static int pci_pic_host_map(struct irq_host *h, unsigned int virq, |
@@ -478,7 +477,6 @@ void m82xx_pci_init_irq(void) | |||
478 | iounmap(immap); | 477 | iounmap(immap); |
479 | return; | 478 | return; |
480 | } | 479 | } |
481 | pci_pic_node = of_node_get(np); | ||
482 | /* PCI interrupt controller registers: status and mask */ | 480 | /* PCI interrupt controller registers: status and mask */ |
483 | regs = of_get_property(np, "reg", &size); | 481 | regs = of_get_property(np, "reg", &size); |
484 | if ((!regs) || (size <= 2)) { | 482 | if ((!regs) || (size <= 2)) { |
@@ -490,7 +488,6 @@ void m82xx_pci_init_irq(void) | |||
490 | ioremap(regs[0], sizeof(*pci_regs.pci_int_stat_reg)); | 488 | ioremap(regs[0], sizeof(*pci_regs.pci_int_stat_reg)); |
491 | pci_regs.pci_int_mask_reg = | 489 | pci_regs.pci_int_mask_reg = |
492 | ioremap(regs[1], sizeof(*pci_regs.pci_int_mask_reg)); | 490 | ioremap(regs[1], sizeof(*pci_regs.pci_int_mask_reg)); |
493 | of_node_put(np); | ||
494 | /* configure chip select for PCI interrupt controller */ | 491 | /* configure chip select for PCI interrupt controller */ |
495 | immap->im_memctl.memc_br3 = regs[0] | 0x00001801; | 492 | immap->im_memctl.memc_br3 = regs[0] | 0x00001801; |
496 | immap->im_memctl.memc_or3 = 0xffff8010; | 493 | immap->im_memctl.memc_or3 = 0xffff8010; |
@@ -501,7 +498,7 @@ void m82xx_pci_init_irq(void) | |||
501 | *pci_regs.pci_int_mask_reg |= 0xfff00000; | 498 | *pci_regs.pci_int_mask_reg |= 0xfff00000; |
502 | iounmap(immap); | 499 | iounmap(immap); |
503 | pci_pic_host = | 500 | pci_pic_host = |
504 | irq_alloc_host(IRQ_HOST_MAP_LINEAR, irq_max - irq_min + 1, | 501 | irq_alloc_host(np, IRQ_HOST_MAP_LINEAR, irq_max - irq_min + 1, |
505 | &pci_pic_host_ops, irq_max + 1); | 502 | &pci_pic_host_ops, irq_max + 1); |
506 | return; | 503 | return; |
507 | } | 504 | } |
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c index 4c9ab5b70bae..bdd97bb2446d 100644 --- a/arch/powerpc/platforms/cell/axon_msi.c +++ b/arch/powerpc/platforms/cell/axon_msi.c | |||
@@ -64,7 +64,6 @@ | |||
64 | 64 | ||
65 | 65 | ||
66 | struct axon_msic { | 66 | struct axon_msic { |
67 | struct device_node *dn; | ||
68 | struct irq_host *irq_host; | 67 | struct irq_host *irq_host; |
69 | __le32 *fifo; | 68 | __le32 *fifo; |
70 | dcr_host_t dcr_host; | 69 | dcr_host_t dcr_host; |
@@ -297,9 +296,7 @@ static int msic_host_map(struct irq_host *h, unsigned int virq, | |||
297 | 296 | ||
298 | static int msic_host_match(struct irq_host *host, struct device_node *dn) | 297 | static int msic_host_match(struct irq_host *host, struct device_node *dn) |
299 | { | 298 | { |
300 | struct axon_msic *msic = host->host_data; | 299 | return host->of_node == dn; |
301 | |||
302 | return msic->dn == dn; | ||
303 | } | 300 | } |
304 | 301 | ||
305 | static struct irq_host_ops msic_host_ops = { | 302 | static struct irq_host_ops msic_host_ops = { |
@@ -314,7 +311,8 @@ static int axon_msi_notify_reboot(struct notifier_block *nb, | |||
314 | u32 tmp; | 311 | u32 tmp; |
315 | 312 | ||
316 | list_for_each_entry(msic, &axon_msic_list, list) { | 313 | list_for_each_entry(msic, &axon_msic_list, list) { |
317 | pr_debug("axon_msi: disabling %s\n", msic->dn->full_name); | 314 | pr_debug("axon_msi: disabling %s\n", |
315 | msic->irq_host->of_node->full_name); | ||
318 | tmp = msic_dcr_read(msic, MSIC_CTRL_REG); | 316 | tmp = msic_dcr_read(msic, MSIC_CTRL_REG); |
319 | tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE; | 317 | tmp &= ~MSIC_CTRL_ENABLE & ~MSIC_CTRL_IRQ_ENABLE; |
320 | msic_dcr_write(msic, MSIC_CTRL_REG, tmp); | 318 | msic_dcr_write(msic, MSIC_CTRL_REG, tmp); |
@@ -370,8 +368,8 @@ static int axon_msi_setup_one(struct device_node *dn) | |||
370 | 368 | ||
371 | msic->fifo = page_address(page); | 369 | msic->fifo = page_address(page); |
372 | 370 | ||
373 | msic->irq_host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, NR_IRQS, | 371 | msic->irq_host = irq_alloc_host(of_node_get(dn), IRQ_HOST_MAP_NOMAP, |
374 | &msic_host_ops, 0); | 372 | NR_IRQS, &msic_host_ops, 0); |
375 | if (!msic->irq_host) { | 373 | if (!msic->irq_host) { |
376 | printk(KERN_ERR "axon_msi: couldn't allocate irq_host for %s\n", | 374 | printk(KERN_ERR "axon_msi: couldn't allocate irq_host for %s\n", |
377 | dn->full_name); | 375 | dn->full_name); |
@@ -387,8 +385,6 @@ static int axon_msi_setup_one(struct device_node *dn) | |||
387 | goto out_free_host; | 385 | goto out_free_host; |
388 | } | 386 | } |
389 | 387 | ||
390 | msic->dn = of_node_get(dn); | ||
391 | |||
392 | set_irq_data(virq, msic); | 388 | set_irq_data(virq, msic); |
393 | set_irq_chained_handler(virq, axon_msi_cascade); | 389 | set_irq_chained_handler(virq, axon_msi_cascade); |
394 | pr_debug("axon_msi: irq 0x%x setup for axon_msi\n", virq); | 390 | pr_debug("axon_msi: irq 0x%x setup for axon_msi\n", virq); |
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c index 47264e722029..c29e634177fa 100644 --- a/arch/powerpc/platforms/cell/interrupt.c +++ b/arch/powerpc/platforms/cell/interrupt.c | |||
@@ -381,7 +381,7 @@ static int __init setup_iic(void) | |||
381 | void __init iic_init_IRQ(void) | 381 | void __init iic_init_IRQ(void) |
382 | { | 382 | { |
383 | /* Setup an irq host data structure */ | 383 | /* Setup an irq host data structure */ |
384 | iic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, IIC_SOURCE_COUNT, | 384 | iic_host = irq_alloc_host(NULL, IRQ_HOST_MAP_LINEAR, IIC_SOURCE_COUNT, |
385 | &iic_host_ops, IIC_IRQ_INVALID); | 385 | &iic_host_ops, IIC_IRQ_INVALID); |
386 | BUG_ON(iic_host == NULL); | 386 | BUG_ON(iic_host == NULL); |
387 | irq_set_default_host(iic_host); | 387 | irq_set_default_host(iic_host); |
diff --git a/arch/powerpc/platforms/cell/spider-pic.c b/arch/powerpc/platforms/cell/spider-pic.c index 05f4b3d3d756..4309c2cbbeb9 100644 --- a/arch/powerpc/platforms/cell/spider-pic.c +++ b/arch/powerpc/platforms/cell/spider-pic.c | |||
@@ -63,7 +63,6 @@ enum { | |||
63 | 63 | ||
64 | struct spider_pic { | 64 | struct spider_pic { |
65 | struct irq_host *host; | 65 | struct irq_host *host; |
66 | struct device_node *of_node; | ||
67 | void __iomem *regs; | 66 | void __iomem *regs; |
68 | unsigned int node_id; | 67 | unsigned int node_id; |
69 | }; | 68 | }; |
@@ -178,8 +177,7 @@ static struct irq_chip spider_pic = { | |||
178 | 177 | ||
179 | static int spider_host_match(struct irq_host *h, struct device_node *node) | 178 | static int spider_host_match(struct irq_host *h, struct device_node *node) |
180 | { | 179 | { |
181 | struct spider_pic *pic = h->host_data; | 180 | return h->of_node == node; |
182 | return node == pic->of_node; | ||
183 | } | 181 | } |
184 | 182 | ||
185 | static int spider_host_map(struct irq_host *h, unsigned int virq, | 183 | static int spider_host_map(struct irq_host *h, unsigned int virq, |
@@ -247,18 +245,18 @@ static unsigned int __init spider_find_cascade_and_node(struct spider_pic *pic) | |||
247 | * tree in case the device-tree is ever fixed | 245 | * tree in case the device-tree is ever fixed |
248 | */ | 246 | */ |
249 | struct of_irq oirq; | 247 | struct of_irq oirq; |
250 | if (of_irq_map_one(pic->of_node, 0, &oirq) == 0) { | 248 | if (of_irq_map_one(pic->host->of_node, 0, &oirq) == 0) { |
251 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 249 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, |
252 | oirq.size); | 250 | oirq.size); |
253 | return virq; | 251 | return virq; |
254 | } | 252 | } |
255 | 253 | ||
256 | /* Now do the horrible hacks */ | 254 | /* Now do the horrible hacks */ |
257 | tmp = of_get_property(pic->of_node, "#interrupt-cells", NULL); | 255 | tmp = of_get_property(pic->host->of_node, "#interrupt-cells", NULL); |
258 | if (tmp == NULL) | 256 | if (tmp == NULL) |
259 | return NO_IRQ; | 257 | return NO_IRQ; |
260 | intsize = *tmp; | 258 | intsize = *tmp; |
261 | imap = of_get_property(pic->of_node, "interrupt-map", &imaplen); | 259 | imap = of_get_property(pic->host->of_node, "interrupt-map", &imaplen); |
262 | if (imap == NULL || imaplen < (intsize + 1)) | 260 | if (imap == NULL || imaplen < (intsize + 1)) |
263 | return NO_IRQ; | 261 | return NO_IRQ; |
264 | iic = of_find_node_by_phandle(imap[intsize]); | 262 | iic = of_find_node_by_phandle(imap[intsize]); |
@@ -308,15 +306,13 @@ static void __init spider_init_one(struct device_node *of_node, int chip, | |||
308 | panic("spider_pic: can't map registers !"); | 306 | panic("spider_pic: can't map registers !"); |
309 | 307 | ||
310 | /* Allocate a host */ | 308 | /* Allocate a host */ |
311 | pic->host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, SPIDER_SRC_COUNT, | 309 | pic->host = irq_alloc_host(of_node_get(of_node), IRQ_HOST_MAP_LINEAR, |
312 | &spider_host_ops, SPIDER_IRQ_INVALID); | 310 | SPIDER_SRC_COUNT, &spider_host_ops, |
311 | SPIDER_IRQ_INVALID); | ||
313 | if (pic->host == NULL) | 312 | if (pic->host == NULL) |
314 | panic("spider_pic: can't allocate irq host !"); | 313 | panic("spider_pic: can't allocate irq host !"); |
315 | pic->host->host_data = pic; | 314 | pic->host->host_data = pic; |
316 | 315 | ||
317 | /* Fill out other bits */ | ||
318 | pic->of_node = of_node_get(of_node); | ||
319 | |||
320 | /* Go through all sources and disable them */ | 316 | /* Go through all sources and disable them */ |
321 | for (i = 0; i < SPIDER_SRC_COUNT; i++) { | 317 | for (i = 0; i < SPIDER_SRC_COUNT; i++) { |
322 | void __iomem *cfg = pic->regs + TIR_CFGA + 8 * i; | 318 | void __iomem *cfg = pic->regs + TIR_CFGA + 8 * i; |
diff --git a/arch/powerpc/platforms/celleb/interrupt.c b/arch/powerpc/platforms/celleb/interrupt.c index 98e6665681d3..4ecdf06e421b 100644 --- a/arch/powerpc/platforms/celleb/interrupt.c +++ b/arch/powerpc/platforms/celleb/interrupt.c | |||
@@ -242,7 +242,7 @@ void __init beatic_init_IRQ(void) | |||
242 | ppc_md.get_irq = beatic_get_irq; | 242 | ppc_md.get_irq = beatic_get_irq; |
243 | 243 | ||
244 | /* Allocate an irq host */ | 244 | /* Allocate an irq host */ |
245 | beatic_host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, | 245 | beatic_host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, |
246 | &beatic_pic_host_ops, | 246 | &beatic_pic_host_ops, |
247 | 0); | 247 | 0); |
248 | BUG_ON(beatic_host == NULL); | 248 | BUG_ON(beatic_host == NULL); |
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c index 63b33675848b..36667460c922 100644 --- a/arch/powerpc/platforms/iseries/irq.c +++ b/arch/powerpc/platforms/iseries/irq.c | |||
@@ -369,7 +369,8 @@ void __init iSeries_init_IRQ(void) | |||
369 | /* Create irq host. No need for a revmap since HV will give us | 369 | /* Create irq host. No need for a revmap since HV will give us |
370 | * back our virtual irq number | 370 | * back our virtual irq number |
371 | */ | 371 | */ |
372 | host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &iseries_irq_host_ops, 0); | 372 | host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, |
373 | &iseries_irq_host_ops, 0); | ||
373 | BUG_ON(host == NULL); | 374 | BUG_ON(host == NULL); |
374 | irq_set_default_host(host); | 375 | irq_set_default_host(host); |
375 | 376 | ||
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 87cd6805171a..999f5e160897 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -384,7 +384,7 @@ static void __init pmac_pic_probe_oldstyle(void) | |||
384 | /* | 384 | /* |
385 | * Allocate an irq host | 385 | * Allocate an irq host |
386 | */ | 386 | */ |
387 | pmac_pic_host = irq_alloc_host(IRQ_HOST_MAP_LINEAR, max_irqs, | 387 | pmac_pic_host = irq_alloc_host(master, IRQ_HOST_MAP_LINEAR, max_irqs, |
388 | &pmac_pic_host_ops, | 388 | &pmac_pic_host_ops, |
389 | max_irqs); | 389 | max_irqs); |
390 | BUG_ON(pmac_pic_host == NULL); | 390 | BUG_ON(pmac_pic_host == NULL); |
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c index 67e32ec9b37e..30b9f4c6eb55 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c | |||
@@ -726,7 +726,7 @@ void __init ps3_init_IRQ(void) | |||
726 | unsigned cpu; | 726 | unsigned cpu; |
727 | struct irq_host *host; | 727 | struct irq_host *host; |
728 | 728 | ||
729 | host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops, | 729 | host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops, |
730 | PS3_INVALID_OUTLET); | 730 | PS3_INVALID_OUTLET); |
731 | irq_set_default_host(host); | 731 | irq_set_default_host(host); |
732 | irq_set_virq_count(PS3_PLUG_MAX + 1); | 732 | irq_set_virq_count(PS3_PLUG_MAX + 1); |
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c index 5bd90a7eb763..5ddb0259b1fb 100644 --- a/arch/powerpc/platforms/pseries/xics.c +++ b/arch/powerpc/platforms/pseries/xics.c | |||
@@ -540,7 +540,7 @@ static void __init xics_init_host(void) | |||
540 | ops = &xics_host_lpar_ops; | 540 | ops = &xics_host_lpar_ops; |
541 | else | 541 | else |
542 | ops = &xics_host_direct_ops; | 542 | ops = &xics_host_direct_ops; |
543 | xics_host = irq_alloc_host(IRQ_HOST_MAP_TREE, 0, ops, | 543 | xics_host = irq_alloc_host(NULL, IRQ_HOST_MAP_TREE, 0, ops, |
544 | XICS_IRQ_SPURIOUS); | 544 | XICS_IRQ_SPURIOUS); |
545 | BUG_ON(xics_host == NULL); | 545 | BUG_ON(xics_host == NULL); |
546 | irq_set_default_host(xics_host); | 546 | irq_set_default_host(xics_host); |