]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sh: Configurable timer IRQ.
authorPaul Mundt <lethal@linux-sh.org>
Mon, 20 Nov 2006 02:18:30 +0000 (11:18 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Wed, 6 Dec 2006 01:45:37 +0000 (10:45 +0900)
All of the various CPU subtypes currently hardcode TIMER_IRQ,
switch this to a config option in the few places we need this.

This allows further removal of hardcoded IRQ headers..

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/Kconfig
arch/sh/kernel/cpu/sh4/setup-sh7780.c
arch/sh/kernel/timers/timer-cmt.c
arch/sh/kernel/timers/timer-mtu2.c
arch/sh/kernel/timers/timer-tmu.c

index ba7a15016307c4072be14897c3c32ac3b0a28986..b95dbb8db661aea7b35b4df2ea0a896f2220216d 100644 (file)
@@ -405,6 +405,13 @@ source "arch/sh/boards/renesas/rts7751r2d/Kconfig"
 
 source "arch/sh/boards/renesas/r7780rp/Kconfig"
 
+config SH_TIMER_IRQ
+       int
+       default "28" if CPU_SUBTYPE_SH7780
+       default "86" if CPU_SUBTYPE_SH7619
+       default "140" if CPU_SUBTYPE_SH7206
+       default "16"
+
 config SH_PCLK_FREQ
        int "Peripheral clock frequency (in Hz)"
        default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343
index 814ddb226531c26c92ed78efd27aea24b5cd98db..4a2b9e01b91f514342bb40245e33e408c73db4cb 100644 (file)
@@ -79,7 +79,7 @@ static int __init sh7780_devices_setup(void)
 __initcall(sh7780_devices_setup);
 
 static struct intc2_data intc2_irq_table[] = {
-       { TIMER_IRQ, 0, 24, 0, INTC_TMU0_MSK, 2 },
+       { 28, 0, 24, 0, INTC_TMU0_MSK, 2 },
        { 21, 1, 0, 0, INTC_RTC_MSK, TIMER_PRIORITY },
        { 22, 1, 1, 0, INTC_RTC_MSK, TIMER_PRIORITY },
        { 23, 1, 2, 0, INTC_RTC_MSK, TIMER_PRIORITY },
index 30687383d4b0f280479933c8ee6eadb38dd8186a..24b03996da51c3cc907cffe3e4ca437840068fa1 100644 (file)
@@ -169,7 +169,7 @@ static int cmt_timer_init(void)
 
        cmt_clock_enable();
 
-       setup_irq(TIMER_IRQ, &cmt_irq);
+       setup_irq(CONFIG_SH_TIMER_IRQ, &cmt_irq);
 
        cmt0_clk.parent = clk_get("module_clk");
 
index 045b2aba13fae9220d8bda6525cfcce78a7e36fd..92c98b5b11ea5bd880b2944bd51068cb191bcfc9 100644 (file)
@@ -167,7 +167,7 @@ static int mtu2_timer_init(void)
        u8 tmp;
        unsigned long interval;
 
-       setup_irq(TIMER_IRQ, &mtu2_irq);
+       setup_irq(CONFIG_SH_TIMER_IRQ, &mtu2_irq);
 
        mtu2_clk1.parent = clk_get("module_clk");
 
index 24927015dc31fc901153935e91eca80e32332c67..06a70db7386d5e8ede4874c74c437040573e0d75 100644 (file)
@@ -149,7 +149,7 @@ static int tmu_timer_init(void)
 {
        unsigned long interval;
 
-       setup_irq(TIMER_IRQ, &tmu_irq);
+       setup_irq(CONFIG_SH_TIMER_IRQ, &tmu_irq);
 
        tmu0_clk.parent = clk_get("module_clk");