Skip to contentSkip to conversation

ARM: shmobile: INTC External IRQ pin driver on r8a7779

PATCH In review Magnus Damm 1 participant 1 message Feb 26, 2013

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 3/3 ARM: shmobile: INTC External IRQ pin driver on r8a7779

From: Magnus Damm <[email protected]>

Update the r8a7779 IRQ code to make use of the INTC External IRQ pin driver for external interrupt pins IRQ0 -> IRQ3.

The r8a7779 SoC can like older SH SoCs configure to use the IRQ0 -> IRQ3 signals as individual interrupts or a combined IRL mode.

Without this patch the r8a7779 SoC code does not fully support external IRQ pins in individual IRQ mode. The r8a7779 PFC code does not yet have gpio_to_irq() support so no need to update such code.

At this point the DT reference implementations are not covered. In the future such code shall tie in the INTC External IRQ pin driver via DT, so this kind of verbose code is not needed for the long term DT case.

---

Tested on r8a7779 Marzen.

Depends on:
[PATCH] irqchip: Renesas INTC External IRQ pin driver [PATCH 01/03] ARM: shmobile: irq_pin() for static IRQ pin assignment

 arch/arm/mach-shmobile/Kconfig               |    1 
 arch/arm/mach-shmobile/board-marzen.c        |    3 -
 arch/arm/mach-shmobile/include/mach/common.h |    1 
 arch/arm/mach-shmobile/intc-r8a7779.c        |   53 +++++++++++++++++++++++++-
 4 files changed, 56 insertions(+), 2 deletions(-)
arch/arm/mach-shmobile/Kconfig +1 -0
@@ -32,6 +32,7 @@ config ARCH_R8A7779
 	select SH_CLK_CPG
 	select USB_ARCH_HAS_EHCI
 	select USB_ARCH_HAS_OHCI
+	select RENESAS_INTC_IRQPIN
 
 config ARCH_EMEV2
 	bool "Emma Mobile EV2"
arch/arm/mach-shmobile/board-marzen.c +2 -1
@@ -67,7 +67,7 @@ static struct resource smsc911x_resource
 		.flags		= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start		= gic_spi(28), /* IRQ 1 */
+		.start		= irq_pin(1), /* IRQ1 */
 		.flags		= IORESOURCE_IRQ,
 	},
 };
@@ -335,6 +335,7 @@ static void __init marzen_init(void)
 				ARRAY_SIZE(dummy_supplies));
 
 	r8a7779_pinmux_init();
+	r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */
 
 	/* SCIF2 (CN18: DEBUG0) */
 	gpio_request(GPIO_FN_TX2_C, NULL);
arch/arm/mach-shmobile/include/mach/common.h +1 -0
@@ -59,6 +59,7 @@ extern void r8a7740_pinmux_init(void);
 extern void r8a7740_pm_init(void);
 
 extern void r8a7779_init_irq(void);
+extern void r8a7779_init_irq_extpin(int irlm);
 extern void r8a7779_init_irq_dt(void);
 extern void r8a7779_map_io(void);
 extern void r8a7779_earlytimer_init(void);
arch/arm/mach-shmobile/intc-r8a7779.c +52 -1

71 lines not on this page · raw message