diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2013-04-05 22:45:11 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-05-31 11:06:52 +0200 |
commit | 3c96d8ea8101936959dede664ac7b97b30fafbe8 (patch) | |
tree | 7a4d3e37d048a8facda78177545ca6ecd9b53769 /arch/arm/mach-u300 | |
parent | f722406faae2d073cc1d01063d1123c35425939e (diff) | |
download | linux-3c96d8ea8101936959dede664ac7b97b30fafbe8.tar.bz2 |
ARM: u300: enable delaytimer on the U300
The U300 can support timer-based delays, so implement this.
Skips past jiffy calibration.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-u300')
-rw-r--r-- | arch/arm/mach-u300/timer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/timer.c b/arch/arm/mach-u300/timer.c index d9e73209c9b8..c3d3802b46a0 100644 --- a/arch/arm/mach-u300/timer.c +++ b/arch/arm/mach-u300/timer.c @@ -18,6 +18,7 @@ #include <linux/clk.h> #include <linux/err.h> #include <linux/irq.h> +#include <linux/delay.h> #include <mach/hardware.h> #include <mach/irqs.h> @@ -345,6 +346,12 @@ static u32 notrace u300_read_sched_clock(void) return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); } +static unsigned long u300_read_current_timer(void) +{ + return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); +} + +static struct delay_timer u300_delay_timer; /* * This sets up the system timers, clock source and clock event. @@ -362,6 +369,10 @@ void __init u300_timer_init(void) setup_sched_clock(u300_read_sched_clock, 32, rate); + u300_delay_timer.read_current_timer = &u300_read_current_timer; + u300_delay_timer.freq = rate; + register_current_timer_delay(&u300_delay_timer); + /* * Disable the "OS" and "DD" timers - these are designed for Symbian! * Example usage in cnh1601578 cpu subsystem pd_timer_app.c |