diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2012-04-06 04:28:14 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-05-12 16:23:51 -0400 |
commit | 9f6b78223b7b49bc06d2e84b15d48f02206ec3c3 (patch) | |
tree | d2669ff89f2cc9ccbaca2072626d5405b5cdd3f6 /arch/arm/mach-shmobile/pfc-r8a7740.c | |
parent | 880452b616136c94c521c03adea07fd5ebe3ed24 (diff) |
ARM: mach-shmobile: r8a7740: add gpio_irq support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Simon Horman <horms@verge.net.au>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/arm/mach-shmobile/pfc-r8a7740.c')
-rw-r--r-- | arch/arm/mach-shmobile/pfc-r8a7740.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/pfc-r8a7740.c b/arch/arm/mach-shmobile/pfc-r8a7740.c index a4fff6950b03..670fe1869dbc 100644 --- a/arch/arm/mach-shmobile/pfc-r8a7740.c +++ b/arch/arm/mach-shmobile/pfc-r8a7740.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <mach/r8a7740.h> | 24 | #include <mach/r8a7740.h> |
25 | #include <mach/irqs.h> | ||
25 | 26 | ||
26 | #define CPU_ALL_PORT(fn, pfx, sfx) \ | 27 | #define CPU_ALL_PORT(fn, pfx, sfx) \ |
27 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ | 28 | PORT_10(fn, pfx, sfx), PORT_90(fn, pfx, sfx), \ |
@@ -2527,6 +2528,41 @@ static struct pinmux_data_reg pinmux_data_regs[] = { | |||
2527 | { }, | 2528 | { }, |
2528 | }; | 2529 | }; |
2529 | 2530 | ||
2531 | static struct pinmux_irq pinmux_irqs[] = { | ||
2532 | PINMUX_IRQ(evt2irq(0x0200), PORT2_FN0, PORT13_FN0), /* IRQ0A */ | ||
2533 | PINMUX_IRQ(evt2irq(0x0220), PORT20_FN0), /* IRQ1A */ | ||
2534 | PINMUX_IRQ(evt2irq(0x0240), PORT11_FN0, PORT12_FN0), /* IRQ2A */ | ||
2535 | PINMUX_IRQ(evt2irq(0x0260), PORT10_FN0, PORT14_FN0), /* IRQ3A */ | ||
2536 | PINMUX_IRQ(evt2irq(0x0280), PORT15_FN0, PORT172_FN0), /* IRQ4A */ | ||
2537 | PINMUX_IRQ(evt2irq(0x02A0), PORT0_FN0, PORT1_FN0), /* IRQ5A */ | ||
2538 | PINMUX_IRQ(evt2irq(0x02C0), PORT121_FN0, PORT173_FN0), /* IRQ6A */ | ||
2539 | PINMUX_IRQ(evt2irq(0x02E0), PORT120_FN0, PORT209_FN0), /* IRQ7A */ | ||
2540 | PINMUX_IRQ(evt2irq(0x0300), PORT119_FN0), /* IRQ8A */ | ||
2541 | PINMUX_IRQ(evt2irq(0x0320), PORT118_FN0, PORT210_FN0), /* IRQ9A */ | ||
2542 | PINMUX_IRQ(evt2irq(0x0340), PORT19_FN0), /* IRQ10A */ | ||
2543 | PINMUX_IRQ(evt2irq(0x0360), PORT104_FN0), /* IRQ11A */ | ||
2544 | PINMUX_IRQ(evt2irq(0x0380), PORT42_FN0, PORT97_FN0), /* IRQ12A */ | ||
2545 | PINMUX_IRQ(evt2irq(0x03A0), PORT64_FN0, PORT98_FN0), /* IRQ13A */ | ||
2546 | PINMUX_IRQ(evt2irq(0x03C0), PORT63_FN0, PORT99_FN0), /* IRQ14A */ | ||
2547 | PINMUX_IRQ(evt2irq(0x03E0), PORT62_FN0, PORT100_FN0), /* IRQ15A */ | ||
2548 | PINMUX_IRQ(evt2irq(0x3200), PORT68_FN0, PORT211_FN0), /* IRQ16A */ | ||
2549 | PINMUX_IRQ(evt2irq(0x3220), PORT69_FN0), /* IRQ17A */ | ||
2550 | PINMUX_IRQ(evt2irq(0x3240), PORT70_FN0), /* IRQ18A */ | ||
2551 | PINMUX_IRQ(evt2irq(0x3260), PORT71_FN0), /* IRQ19A */ | ||
2552 | PINMUX_IRQ(evt2irq(0x3280), PORT67_FN0), /* IRQ20A */ | ||
2553 | PINMUX_IRQ(evt2irq(0x32A0), PORT202_FN0), /* IRQ21A */ | ||
2554 | PINMUX_IRQ(evt2irq(0x32C0), PORT95_FN0), /* IRQ22A */ | ||
2555 | PINMUX_IRQ(evt2irq(0x32E0), PORT96_FN0), /* IRQ23A */ | ||
2556 | PINMUX_IRQ(evt2irq(0x3300), PORT180_FN0), /* IRQ24A */ | ||
2557 | PINMUX_IRQ(evt2irq(0x3320), PORT38_FN0), /* IRQ25A */ | ||
2558 | PINMUX_IRQ(evt2irq(0x3340), PORT58_FN0, PORT81_FN0), /* IRQ26A */ | ||
2559 | PINMUX_IRQ(evt2irq(0x3360), PORT57_FN0, PORT168_FN0), /* IRQ27A */ | ||
2560 | PINMUX_IRQ(evt2irq(0x3380), PORT56_FN0, PORT169_FN0), /* IRQ28A */ | ||
2561 | PINMUX_IRQ(evt2irq(0x33A0), PORT50_FN0, PORT170_FN0), /* IRQ29A */ | ||
2562 | PINMUX_IRQ(evt2irq(0x33C0), PORT49_FN0, PORT171_FN0), /* IRQ30A */ | ||
2563 | PINMUX_IRQ(evt2irq(0x33E0), PORT41_FN0, PORT167_FN0), /* IRQ31A */ | ||
2564 | }; | ||
2565 | |||
2530 | static struct pinmux_info r8a7740_pinmux_info = { | 2566 | static struct pinmux_info r8a7740_pinmux_info = { |
2531 | .name = "r8a7740_pfc", | 2567 | .name = "r8a7740_pfc", |
2532 | .reserved_id = PINMUX_RESERVED, | 2568 | .reserved_id = PINMUX_RESERVED, |
@@ -2554,6 +2590,9 @@ static struct pinmux_info r8a7740_pinmux_info = { | |||
2554 | 2590 | ||
2555 | .gpio_data = pinmux_data, | 2591 | .gpio_data = pinmux_data, |
2556 | .gpio_data_size = ARRAY_SIZE(pinmux_data), | 2592 | .gpio_data_size = ARRAY_SIZE(pinmux_data), |
2593 | |||
2594 | .gpio_irq = pinmux_irqs, | ||
2595 | .gpio_irq_size = ARRAY_SIZE(pinmux_irqs), | ||
2557 | }; | 2596 | }; |
2558 | 2597 | ||
2559 | void r8a7740_pinmux_init(void) | 2598 | void r8a7740_pinmux_init(void) |