aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/pfc-sh73a0.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2011-10-12 03:21:42 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-11-04 12:02:51 -0400
commita1993055efcc14fd6d213b936d28a41ea52e1d3d (patch)
tree5284a00f273605d79cc9367594605a44ac1729ed /arch/arm/mach-shmobile/pfc-sh73a0.c
parentda5713ef03aba15761eeeade4f4938e5db98b1e2 (diff)
ARM: mach-shmobile: Use common INTC IRQ code on sh73a0
Improve IRQ triggering support by making use of the macro INTC_IRQ_PINS_32() for INTCA on sh73a0. Unfortunately it is not as easy as just using the macro as-is, we need to do mask and unmaks in the GIC but configure other bits and ack in INTCA. Update GPIO IRQ mappings while at it. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/pfc-sh73a0.c')
-rw-r--r--arch/arm/mach-shmobile/pfc-sh73a0.c68
1 files changed, 35 insertions, 33 deletions
diff --git a/arch/arm/mach-shmobile/pfc-sh73a0.c b/arch/arm/mach-shmobile/pfc-sh73a0.c
index 57322c9fd9b6..5abe02fbd6b9 100644
--- a/arch/arm/mach-shmobile/pfc-sh73a0.c
+++ b/arch/arm/mach-shmobile/pfc-sh73a0.c
@@ -2766,41 +2766,43 @@ static struct pinmux_data_reg pinmux_data_regs[] = {
2766 { }, 2766 { },
2767}; 2767};
2768 2768
2769#define EXT_IRQ(n) gic_spi((n) + 1) /* GIC SPI starting from 1 for IRQ0 */ 2769/* IRQ pins through INTCS with IRQ0->15 from 0x200 and IRQ16-31 from 0x3200 */
2770#define EXT_IRQ16L(n) intcs_evt2irq(0x200 + ((n) << 5))
2771#define EXT_IRQ16H(n) intcs_evt2irq(0x3200 + ((n - 16) << 5))
2770 2772
2771static struct pinmux_irq pinmux_irqs[] = { 2773static struct pinmux_irq pinmux_irqs[] = {
2772 PINMUX_IRQ(EXT_IRQ(19), PORT9_FN0), 2774 PINMUX_IRQ(EXT_IRQ16H(19), PORT9_FN0),
2773 PINMUX_IRQ(EXT_IRQ(1), PORT10_FN0), 2775 PINMUX_IRQ(EXT_IRQ16L(1), PORT10_FN0),
2774 PINMUX_IRQ(EXT_IRQ(0), PORT11_FN0), 2776 PINMUX_IRQ(EXT_IRQ16L(0), PORT11_FN0),
2775 PINMUX_IRQ(EXT_IRQ(18), PORT13_FN0), 2777 PINMUX_IRQ(EXT_IRQ16H(18), PORT13_FN0),
2776 PINMUX_IRQ(EXT_IRQ(20), PORT14_FN0), 2778 PINMUX_IRQ(EXT_IRQ16H(20), PORT14_FN0),
2777 PINMUX_IRQ(EXT_IRQ(21), PORT15_FN0), 2779 PINMUX_IRQ(EXT_IRQ16H(21), PORT15_FN0),
2778 PINMUX_IRQ(EXT_IRQ(31), PORT26_FN0), 2780 PINMUX_IRQ(EXT_IRQ16H(31), PORT26_FN0),
2779 PINMUX_IRQ(EXT_IRQ(30), PORT27_FN0), 2781 PINMUX_IRQ(EXT_IRQ16H(30), PORT27_FN0),
2780 PINMUX_IRQ(EXT_IRQ(29), PORT28_FN0), 2782 PINMUX_IRQ(EXT_IRQ16H(29), PORT28_FN0),
2781 PINMUX_IRQ(EXT_IRQ(22), PORT40_FN0), 2783 PINMUX_IRQ(EXT_IRQ16H(22), PORT40_FN0),
2782 PINMUX_IRQ(EXT_IRQ(23), PORT53_FN0), 2784 PINMUX_IRQ(EXT_IRQ16H(23), PORT53_FN0),
2783 PINMUX_IRQ(EXT_IRQ(10), PORT54_FN0), 2785 PINMUX_IRQ(EXT_IRQ16L(10), PORT54_FN0),
2784 PINMUX_IRQ(EXT_IRQ(9), PORT56_FN0), 2786 PINMUX_IRQ(EXT_IRQ16L(9), PORT56_FN0),
2785 PINMUX_IRQ(EXT_IRQ(26), PORT115_FN0), 2787 PINMUX_IRQ(EXT_IRQ16H(26), PORT115_FN0),
2786 PINMUX_IRQ(EXT_IRQ(27), PORT116_FN0), 2788 PINMUX_IRQ(EXT_IRQ16H(27), PORT116_FN0),
2787 PINMUX_IRQ(EXT_IRQ(28), PORT117_FN0), 2789 PINMUX_IRQ(EXT_IRQ16H(28), PORT117_FN0),
2788 PINMUX_IRQ(EXT_IRQ(24), PORT118_FN0), 2790 PINMUX_IRQ(EXT_IRQ16H(24), PORT118_FN0),
2789 PINMUX_IRQ(EXT_IRQ(6), PORT147_FN0), 2791 PINMUX_IRQ(EXT_IRQ16L(6), PORT147_FN0),
2790 PINMUX_IRQ(EXT_IRQ(2), PORT149_FN0), 2792 PINMUX_IRQ(EXT_IRQ16L(2), PORT149_FN0),
2791 PINMUX_IRQ(EXT_IRQ(7), PORT150_FN0), 2793 PINMUX_IRQ(EXT_IRQ16L(7), PORT150_FN0),
2792 PINMUX_IRQ(EXT_IRQ(12), PORT156_FN0), 2794 PINMUX_IRQ(EXT_IRQ16L(12), PORT156_FN0),
2793 PINMUX_IRQ(EXT_IRQ(4), PORT159_FN0), 2795 PINMUX_IRQ(EXT_IRQ16L(4), PORT159_FN0),
2794 PINMUX_IRQ(EXT_IRQ(25), PORT164_FN0), 2796 PINMUX_IRQ(EXT_IRQ16H(25), PORT164_FN0),
2795 PINMUX_IRQ(EXT_IRQ(8), PORT223_FN0), 2797 PINMUX_IRQ(EXT_IRQ16L(8), PORT223_FN0),
2796 PINMUX_IRQ(EXT_IRQ(3), PORT224_FN0), 2798 PINMUX_IRQ(EXT_IRQ16L(3), PORT224_FN0),
2797 PINMUX_IRQ(EXT_IRQ(5), PORT227_FN0), 2799 PINMUX_IRQ(EXT_IRQ16L(5), PORT227_FN0),
2798 PINMUX_IRQ(EXT_IRQ(17), PORT234_FN0), 2800 PINMUX_IRQ(EXT_IRQ16H(17), PORT234_FN0),
2799 PINMUX_IRQ(EXT_IRQ(11), PORT238_FN0), 2801 PINMUX_IRQ(EXT_IRQ16L(11), PORT238_FN0),
2800 PINMUX_IRQ(EXT_IRQ(13), PORT239_FN0), 2802 PINMUX_IRQ(EXT_IRQ16L(13), PORT239_FN0),
2801 PINMUX_IRQ(EXT_IRQ(16), PORT249_FN0), 2803 PINMUX_IRQ(EXT_IRQ16H(16), PORT249_FN0),
2802 PINMUX_IRQ(EXT_IRQ(14), PORT251_FN0), 2804 PINMUX_IRQ(EXT_IRQ16L(14), PORT251_FN0),
2803 PINMUX_IRQ(EXT_IRQ(9), PORT308_FN0), 2805 PINMUX_IRQ(EXT_IRQ16L(9), PORT308_FN0),
2804}; 2806};
2805 2807
2806static struct pinmux_info sh73a0_pinmux_info = { 2808static struct pinmux_info sh73a0_pinmux_info = {