aboutsummaryrefslogtreecommitdiff
path: root/arch/c6x/platforms/megamod-pic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-24 09:30:27 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-24 09:30:27 -0700
commit90e66dd93d53f346e6f652f6eb6512f576917ee7 (patch)
tree472026acf37968983415dae8f03948eb8a211fe7 /arch/c6x/platforms/megamod-pic.c
parentf0a08fcb5972167e55faa330c4a24fbaa3328b1f (diff)
parentb9b8722d4704137d1c85b8e62364b487cbbe8bf0 (diff)
Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming
Pull C6X changes from Mark Salter: - remove use of legacy irqs which really wasn't needed - add support for C66x SoC on EVMC6678 board - clean up compiler warning * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming: C6X: clean up compiler warning C6X: add basic support for TMS320C6678 SoC C6X: remove dependence on legacy IRQs C6X: remove megamod-pic requirement on direct-mapped core pic
Diffstat (limited to 'arch/c6x/platforms/megamod-pic.c')
-rw-r--r--arch/c6x/platforms/megamod-pic.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/arch/c6x/platforms/megamod-pic.c b/arch/c6x/platforms/megamod-pic.c
index c1c4e2ae3f8..74e3371eb82 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)
* as their interrupt parent.
*/
for (i = 0; i < NR_COMBINERS; i++) {
+ struct irq_data *irq_data;
+ irq_hw_number_t hwirq;
irq = irq_of_parse_and_map(np, i);
if (irq == NO_IRQ)
continue;
+ irq_data = irq_get_irq_data(irq);
+ if (!irq_data) {
+ pr_err("%s: combiner-%d no irq_data for virq %d!\n",
+ np->full_name, i, irq);
+ continue;
+ }
+
+ hwirq = irq_data->hwirq;
+
/*
- * We count on the core priority interrupts (4 - 15) being
- * direct mapped. Check that device tree provided something
- * in that range.
+ * Check that device tree provided something in the range
+ * of the core priority interrupts (4 - 15).
*/
- if (irq < 4 || irq >= NR_PRIORITY_IRQS) {
- pr_err("%s: combiner-%d virq %d out of range!\n",
- np->full_name, i, irq);
+ if (hwirq < 4 || hwirq >= NR_PRIORITY_IRQS) {
+ pr_err("%s: combiner-%d core irq %ld out of range!\n",
+ np->full_name, i, hwirq);
continue;
}
/* record the mapping */
- mapping[irq - 4] = i;
+ mapping[hwirq - 4] = i;
- pr_debug("%s: combiner-%d cascading to virq %d\n",
- np->full_name, i, irq);
+ pr_debug("%s: combiner-%d cascading to hwirq %ld\n",
+ np->full_name, i, hwirq);
cascade_data[i].pic = pic;
cascade_data[i].index = i;