Skip to contentSkip to conversation

ARM: mach-shmobile: sh73a0 INTCS support

PATCH In review Magnus Damm 2 participants 2 messages Dec 21, 2010 – Dec 22, 2010

Subsystems (4)
lore
Share & tools
lore

Magnus Damm

author maintainer
#0 lore raw

PATCH 1/1 ARM: mach-shmobile: sh73a0 INTCS support

From: Magnus Damm <[email protected]>

Add INTCS support for the sh73a0 processor.

The interrupts on the sh73a0 processor are managed through controllers such as GIC, INTCS and INTCA.

The ARM cores use the GIC as primary interrupt controller and the INTCS and INTCA are hanging off the GIC as cascaded interrupt controllers.

Peripherals connected both to the GIC and the INTC controllers should if possible only use the GIC.

If no GIC connection is available then INTCS and INTCA may be used instead.

---

Tested on sh73a0 / AG5EVM using the TMU.

 arch/arm/mach-shmobile/Makefile              |    2 
 arch/arm/mach-shmobile/board-ag5evm.c        |    5 
 arch/arm/mach-shmobile/include/mach/common.h |    1 
 arch/arm/mach-shmobile/intc-sh73a0.c         |  267 ++++++++++++++++++++++++++
 4 files changed, 271 insertions(+), 4 deletions(-)
arch/arm/mach-shmobile/Makefile +1 -1
@@ -9,7 +9,7 @@ obj-y				:= timer.o console.o clock.o pm
 obj-$(CONFIG_ARCH_SH7367)	+= setup-sh7367.o clock-sh7367.o intc-sh7367.o
 obj-$(CONFIG_ARCH_SH7377)	+= setup-sh7377.o clock-sh7377.o intc-sh7377.o
 obj-$(CONFIG_ARCH_SH7372)	+= setup-sh7372.o clock-sh7372.o intc-sh7372.o
-obj-$(CONFIG_ARCH_SH73A0)	+= setup-sh73a0.o clock-sh73a0.o
+obj-$(CONFIG_ARCH_SH73A0)	+= setup-sh73a0.o clock-sh73a0.o intc-sh73a0.o
 
 # SMP objects
 smp-y				:= platsmp.o headsmp.o
arch/arm/mach-shmobile/board-ag5evm.c +2 -3
@@ -179,12 +179,11 @@ static void __init ag5evm_map_io(void)
 
 void __init ag5evm_init_irq(void)
 {
+	sh73a0_init_irq();
+
 	/* setup PINT: enable PINTA2 as active low */
 	__raw_writel(__raw_readl(PINTER0A) | (1<<29), PINTER0A);
 	__raw_writew(__raw_readw(PINTCR0A) | (2<<10), PINTCR0A);
-
-	gic_dist_init(0, __io(0xf0001000), 29);
-	gic_cpu_init(0, __io(0xf0000100));
 }
 
 static void __init ag5evm_init(void)
arch/arm/mach-shmobile/include/mach/common.h +1 -0
@@ -31,6 +31,7 @@ extern void sh7372_pinmux_init(void);
 extern struct clk sh7372_extal1_clk;
 extern struct clk sh7372_extal2_clk;
 
+extern void sh73a0_init_irq(void);
 extern void sh73a0_add_early_devices(void);
 extern void sh73a0_add_standard_devices(void);
 extern void sh73a0_clock_init(void);
arch/arm/mach-shmobile/intc-sh73a0.c new file +267 -0

267 lines not on this page · raw message

#1 lore raw
Quoted 14 lines · Magnus Damm

Add INTCS support for the sh73a0 processor.

The interrupts on the sh73a0 processor are managed through controllers such as GIC, INTCS and INTCA.

The ARM cores use the GIC as primary interrupt controller and the INTCS and INTCA are hanging off the GIC as cascaded interrupt controllers.

Peripherals connected both to the GIC and the INTC controllers should if possible only use the GIC.

If no GIC connection is available then INTCS and INTCA may be used instead.

Quoted 5 lines · Magnus Damm

Add support for 2 TMU timer channels on sh73a0.

One timer channel is used for clocksource and the other is used for clockevents. All channels in the same TMU block share MSTP bit as usual.

Both applied to rmobile-latest, thanks.