diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-10-18 05:06:02 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-11-05 03:55:31 -0500 |
commit | 0813069d03f312b48b836f20e7f12073288f0f82 (patch) | |
tree | 8f04587c29096e0246654d4458a3857b08156be0 /arch/arm | |
parent | b7a5bcd5cdef34093f340029a1a097c136c5369b (diff) |
ARM: plat-nomadik: pass IRQ to timer driver
In order to convert the MTU timer to work with sparse IRQ we need
to pass the IRQ used when initializing instead of just letting
it rely on a special name being used in the IRQ header file.
Cc: Alessandro Rubini <rubini@unipv.it>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-nomadik/board-nhk8815.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-ux500/timer.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-nomadik/include/plat/mtu.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-nomadik/timer.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-nomadik/board-nhk8815.c b/arch/arm/mach-nomadik/board-nhk8815.c index 22ef8a1abe08..16f10e04a805 100644 --- a/arch/arm/mach-nomadik/board-nhk8815.c +++ b/arch/arm/mach-nomadik/board-nhk8815.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <asm/sizes.h> | 29 | #include <asm/sizes.h> |
30 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
32 | #include <asm/mach/irq.h> | ||
33 | #include <asm/mach/flash.h> | 32 | #include <asm/mach/flash.h> |
34 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
35 | 34 | ||
@@ -37,6 +36,7 @@ | |||
37 | 36 | ||
38 | #include <linux/platform_data/mtd-nomadik-nand.h> | 37 | #include <linux/platform_data/mtd-nomadik-nand.h> |
39 | #include <mach/fsmc.h> | 38 | #include <mach/fsmc.h> |
39 | #include <mach/irqs.h> | ||
40 | 40 | ||
41 | #include "cpu-8815.h" | 41 | #include "cpu-8815.h" |
42 | 42 | ||
@@ -260,7 +260,7 @@ static void __init nomadik_timer_init(void) | |||
260 | src_cr |= SRC_CR_INIT_VAL; | 260 | src_cr |= SRC_CR_INIT_VAL; |
261 | writel(src_cr, io_p2v(NOMADIK_SRC_BASE)); | 261 | writel(src_cr, io_p2v(NOMADIK_SRC_BASE)); |
262 | 262 | ||
263 | nmdk_timer_init(io_p2v(NOMADIK_MTU0_BASE)); | 263 | nmdk_timer_init(io_p2v(NOMADIK_MTU0_BASE), IRQ_MTU0); |
264 | } | 264 | } |
265 | 265 | ||
266 | static struct sys_timer nomadik_timer = { | 266 | static struct sys_timer nomadik_timer = { |
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index 6f39731951b0..20d02fa01ec3 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c | |||
@@ -96,7 +96,7 @@ dt_fail: | |||
96 | * | 96 | * |
97 | */ | 97 | */ |
98 | 98 | ||
99 | nmdk_timer_init(mtu_timer_base); | 99 | nmdk_timer_init(mtu_timer_base, IRQ_MTU0); |
100 | clksrc_dbx500_prcmu_init(prcmu_timer_base); | 100 | clksrc_dbx500_prcmu_init(prcmu_timer_base); |
101 | ux500_twd_init(); | 101 | ux500_twd_init(); |
102 | } | 102 | } |
diff --git a/arch/arm/plat-nomadik/include/plat/mtu.h b/arch/arm/plat-nomadik/include/plat/mtu.h index 582641f3dc01..80088973b734 100644 --- a/arch/arm/plat-nomadik/include/plat/mtu.h +++ b/arch/arm/plat-nomadik/include/plat/mtu.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __PLAT_MTU_H | 1 | #ifndef __PLAT_MTU_H |
2 | #define __PLAT_MTU_H | 2 | #define __PLAT_MTU_H |
3 | 3 | ||
4 | void nmdk_timer_init(void __iomem *base); | 4 | void nmdk_timer_init(void __iomem *base, int irq); |
5 | void nmdk_clkevt_reset(void); | 5 | void nmdk_clkevt_reset(void); |
6 | void nmdk_clksrc_reset(void); | 6 | void nmdk_clksrc_reset(void); |
7 | 7 | ||
diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c index 9222e5522a43..0ae2b068ee0f 100644 --- a/arch/arm/plat-nomadik/timer.c +++ b/arch/arm/plat-nomadik/timer.c | |||
@@ -174,7 +174,7 @@ void nmdk_clksrc_reset(void) | |||
174 | mtu_base + MTU_CR(0)); | 174 | mtu_base + MTU_CR(0)); |
175 | } | 175 | } |
176 | 176 | ||
177 | void __init nmdk_timer_init(void __iomem *base) | 177 | void __init nmdk_timer_init(void __iomem *base, int irq) |
178 | { | 178 | { |
179 | unsigned long rate; | 179 | unsigned long rate; |
180 | struct clk *clk0; | 180 | struct clk *clk0; |
@@ -217,7 +217,7 @@ void __init nmdk_timer_init(void __iomem *base) | |||
217 | #endif | 217 | #endif |
218 | 218 | ||
219 | /* Timer 1 is used for events, register irq and clockevents */ | 219 | /* Timer 1 is used for events, register irq and clockevents */ |
220 | setup_irq(IRQ_MTU0, &nmdk_timer_irq); | 220 | setup_irq(irq, &nmdk_timer_irq); |
221 | nmdk_clkevt.cpumask = cpumask_of(0); | 221 | nmdk_clkevt.cpumask = cpumask_of(0); |
222 | clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU); | 222 | clockevents_config_and_register(&nmdk_clkevt, rate, 2, 0xffffffffU); |
223 | } | 223 | } |