aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac/pic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/powermac/pic.c')
-rw-r--r--arch/powerpc/platforms/powermac/pic.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 7761aabfc293..66ad93de1d55 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -61,7 +61,7 @@ static DEFINE_RAW_SPINLOCK(pmac_pic_lock);
61static unsigned long ppc_lost_interrupts[NR_MASK_WORDS]; 61static unsigned long ppc_lost_interrupts[NR_MASK_WORDS];
62static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS]; 62static unsigned long ppc_cached_irq_mask[NR_MASK_WORDS];
63static int pmac_irq_cascade = -1; 63static int pmac_irq_cascade = -1;
64static struct irq_host *pmac_pic_host; 64static struct irq_domain *pmac_pic_host;
65 65
66static void __pmac_retrigger(unsigned int irq_nr) 66static void __pmac_retrigger(unsigned int irq_nr)
67{ 67{
@@ -268,13 +268,13 @@ static struct irqaction gatwick_cascade_action = {
268 .name = "cascade", 268 .name = "cascade",
269}; 269};
270 270
271static int pmac_pic_host_match(struct irq_host *h, struct device_node *node) 271static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node)
272{ 272{
273 /* We match all, we don't always have a node anyway */ 273 /* We match all, we don't always have a node anyway */
274 return 1; 274 return 1;
275} 275}
276 276
277static int pmac_pic_host_map(struct irq_host *h, unsigned int virq, 277static int pmac_pic_host_map(struct irq_domain *h, unsigned int virq,
278 irq_hw_number_t hw) 278 irq_hw_number_t hw)
279{ 279{
280 if (hw >= max_irqs) 280 if (hw >= max_irqs)
@@ -288,21 +288,10 @@ static int pmac_pic_host_map(struct irq_host *h, unsigned int virq,
288 return 0; 288 return 0;
289} 289}
290 290
291static int pmac_pic_host_xlate(struct irq_host *h, struct device_node *ct, 291static const struct irq_domain_ops pmac_pic_host_ops = {
292 const u32 *intspec, unsigned int intsize,
293 irq_hw_number_t *out_hwirq,
294 unsigned int *out_flags)
295
296{
297 *out_flags = IRQ_TYPE_NONE;
298 *out_hwirq = *intspec;
299 return 0;
300}
301
302static struct irq_host_ops pmac_pic_host_ops = {
303 .match = pmac_pic_host_match, 292 .match = pmac_pic_host_match,
304 .map = pmac_pic_host_map, 293 .map = pmac_pic_host_map,
305 .xlate = pmac_pic_host_xlate, 294 .xlate = irq_domain_xlate_onecell,
306}; 295};
307 296
308static void __init pmac_pic_probe_oldstyle(void) 297static void __init pmac_pic_probe_oldstyle(void)
@@ -352,9 +341,8 @@ static void __init pmac_pic_probe_oldstyle(void)
352 /* 341 /*
353 * Allocate an irq host 342 * Allocate an irq host
354 */ 343 */
355 pmac_pic_host = irq_alloc_host(master, IRQ_HOST_MAP_LINEAR, max_irqs, 344 pmac_pic_host = irq_domain_add_linear(master, max_irqs,
356 &pmac_pic_host_ops, 345 &pmac_pic_host_ops, NULL);
357 max_irqs);
358 BUG_ON(pmac_pic_host == NULL); 346 BUG_ON(pmac_pic_host == NULL);
359 irq_set_default_host(pmac_pic_host); 347 irq_set_default_host(pmac_pic_host);
360 348
@@ -469,7 +457,6 @@ static struct mpic * __init pmac_setup_one_mpic(struct device_node *np,
469 457
470 pmac_call_feature(PMAC_FTR_ENABLE_MPIC, np, 0, 0); 458 pmac_call_feature(PMAC_FTR_ENABLE_MPIC, np, 0, 0);
471 459
472 flags |= MPIC_WANTS_RESET;
473 if (of_get_property(np, "big-endian", NULL)) 460 if (of_get_property(np, "big-endian", NULL))
474 flags |= MPIC_BIG_ENDIAN; 461 flags |= MPIC_BIG_ENDIAN;
475 462