diff options
Diffstat (limited to 'arch/powerpc/platforms/52xx/media5200.c')
-rw-r--r-- | arch/powerpc/platforms/52xx/media5200.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/52xx/media5200.c b/arch/powerpc/platforms/52xx/media5200.c index 96f85e5e0cd3..17d91b7da315 100644 --- a/arch/powerpc/platforms/52xx/media5200.c +++ b/arch/powerpc/platforms/52xx/media5200.c | |||
@@ -45,7 +45,7 @@ static struct of_device_id mpc5200_gpio_ids[] __initdata = { | |||
45 | struct media5200_irq { | 45 | struct media5200_irq { |
46 | void __iomem *regs; | 46 | void __iomem *regs; |
47 | spinlock_t lock; | 47 | spinlock_t lock; |
48 | struct irq_host *irqhost; | 48 | struct irq_domain *irqhost; |
49 | }; | 49 | }; |
50 | struct media5200_irq media5200_irq; | 50 | struct media5200_irq media5200_irq; |
51 | 51 | ||
@@ -112,7 +112,7 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) | |||
112 | raw_spin_unlock(&desc->lock); | 112 | raw_spin_unlock(&desc->lock); |
113 | } | 113 | } |
114 | 114 | ||
115 | static int media5200_irq_map(struct irq_host *h, unsigned int virq, | 115 | static int media5200_irq_map(struct irq_domain *h, unsigned int virq, |
116 | irq_hw_number_t hw) | 116 | irq_hw_number_t hw) |
117 | { | 117 | { |
118 | pr_debug("%s: h=%p, virq=%i, hwirq=%i\n", __func__, h, virq, (int)hw); | 118 | pr_debug("%s: h=%p, virq=%i, hwirq=%i\n", __func__, h, virq, (int)hw); |
@@ -122,7 +122,7 @@ static int media5200_irq_map(struct irq_host *h, unsigned int virq, | |||
122 | return 0; | 122 | return 0; |
123 | } | 123 | } |
124 | 124 | ||
125 | static int media5200_irq_xlate(struct irq_host *h, struct device_node *ct, | 125 | static int media5200_irq_xlate(struct irq_domain *h, struct device_node *ct, |
126 | const u32 *intspec, unsigned int intsize, | 126 | const u32 *intspec, unsigned int intsize, |
127 | irq_hw_number_t *out_hwirq, | 127 | irq_hw_number_t *out_hwirq, |
128 | unsigned int *out_flags) | 128 | unsigned int *out_flags) |
@@ -136,7 +136,7 @@ static int media5200_irq_xlate(struct irq_host *h, struct device_node *ct, | |||
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | static struct irq_host_ops media5200_irq_ops = { | 139 | static const struct irq_domain_ops media5200_irq_ops = { |
140 | .map = media5200_irq_map, | 140 | .map = media5200_irq_map, |
141 | .xlate = media5200_irq_xlate, | 141 | .xlate = media5200_irq_xlate, |
142 | }; | 142 | }; |
@@ -173,15 +173,12 @@ static void __init media5200_init_irq(void) | |||
173 | 173 | ||
174 | spin_lock_init(&media5200_irq.lock); | 174 | spin_lock_init(&media5200_irq.lock); |
175 | 175 | ||
176 | media5200_irq.irqhost = irq_alloc_host(fpga_np, IRQ_HOST_MAP_LINEAR, | 176 | media5200_irq.irqhost = irq_domain_add_linear(fpga_np, |
177 | MEDIA5200_NUM_IRQS, | 177 | MEDIA5200_NUM_IRQS, &media5200_irq_ops, &media5200_irq); |
178 | &media5200_irq_ops, -1); | ||
179 | if (!media5200_irq.irqhost) | 178 | if (!media5200_irq.irqhost) |
180 | goto out; | 179 | goto out; |
181 | pr_debug("%s: allocated irqhost\n", __func__); | 180 | pr_debug("%s: allocated irqhost\n", __func__); |
182 | 181 | ||
183 | media5200_irq.irqhost->host_data = &media5200_irq; | ||
184 | |||
185 | irq_set_handler_data(cascade_virq, &media5200_irq); | 182 | irq_set_handler_data(cascade_virq, &media5200_irq); |
186 | irq_set_chained_handler(cascade_virq, media5200_irq_cascade); | 183 | irq_set_chained_handler(cascade_virq, media5200_irq_cascade); |
187 | 184 | ||