diff options
Diffstat (limited to 'arch/c6x')
-rw-r--r-- | arch/c6x/platforms/megamod-pic.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/arch/c6x/platforms/megamod-pic.c b/arch/c6x/platforms/megamod-pic.c index c1c4e2ae3f85..74e3371eb824 100644 --- a/arch/c6x/platforms/megamod-pic.c +++ b/arch/c6x/platforms/megamod-pic.c | |||
@@ -243,27 +243,37 @@ static struct megamod_pic * __init init_megamod_pic(struct device_node *np) | |||
243 | * as their interrupt parent. | 243 | * as their interrupt parent. |
244 | */ | 244 | */ |
245 | for (i = 0; i < NR_COMBINERS; i++) { | 245 | for (i = 0; i < NR_COMBINERS; i++) { |
246 | struct irq_data *irq_data; | ||
247 | irq_hw_number_t hwirq; | ||
246 | 248 | ||
247 | irq = irq_of_parse_and_map(np, i); | 249 | irq = irq_of_parse_and_map(np, i); |
248 | if (irq == NO_IRQ) | 250 | if (irq == NO_IRQ) |
249 | continue; | 251 | continue; |
250 | 252 | ||
253 | irq_data = irq_get_irq_data(irq); | ||
254 | if (!irq_data) { | ||
255 | pr_err("%s: combiner-%d no irq_data for virq %d!\n", | ||
256 | np->full_name, i, irq); | ||
257 | continue; | ||
258 | } | ||
259 | |||
260 | hwirq = irq_data->hwirq; | ||
261 | |||
251 | /* | 262 | /* |
252 | * We count on the core priority interrupts (4 - 15) being | 263 | * Check that device tree provided something in the range |
253 | * direct mapped. Check that device tree provided something | 264 | * of the core priority interrupts (4 - 15). |
254 | * in that range. | ||
255 | */ | 265 | */ |
256 | if (irq < 4 || irq >= NR_PRIORITY_IRQS) { | 266 | if (hwirq < 4 || hwirq >= NR_PRIORITY_IRQS) { |
257 | pr_err("%s: combiner-%d virq %d out of range!\n", | 267 | pr_err("%s: combiner-%d core irq %ld out of range!\n", |
258 | np->full_name, i, irq); | 268 | np->full_name, i, hwirq); |
259 | continue; | 269 | continue; |
260 | } | 270 | } |
261 | 271 | ||
262 | /* record the mapping */ | 272 | /* record the mapping */ |
263 | mapping[irq - 4] = i; | 273 | mapping[hwirq - 4] = i; |
264 | 274 | ||
265 | pr_debug("%s: combiner-%d cascading to virq %d\n", | 275 | pr_debug("%s: combiner-%d cascading to hwirq %ld\n", |
266 | np->full_name, i, irq); | 276 | np->full_name, i, hwirq); |
267 | 277 | ||
268 | cascade_data[i].pic = pic; | 278 | cascade_data[i].pic = pic; |
269 | cascade_data[i].index = i; | 279 | cascade_data[i].index = i; |