Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+11
+11
arch/arm/mach-u300/timer.c
··· 18 18 #include <linux/clk.h> 19 19 #include <linux/err.h> 20 20 #include <linux/irq.h> 21 + #include <linux/delay.h> 21 22 22 23 #include <mach/hardware.h> 23 24 #include <mach/irqs.h> ··· 346 345 return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); 347 346 } 348 347 348 + static unsigned long u300_read_current_timer(void) 349 + { 350 + return readl(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC); 351 + } 352 + 353 + static struct delay_timer u300_delay_timer; 349 354 350 355 /* 351 356 * This sets up the system timers, clock source and clock event. ··· 368 361 rate = clk_get_rate(clk); 369 362 370 363 setup_sched_clock(u300_read_sched_clock, 32, rate); 364 + 365 + u300_delay_timer.read_current_timer = &u300_read_current_timer; 366 + u300_delay_timer.freq = rate; 367 + register_current_timer_delay(&u300_delay_timer); 371 368 372 369 /* 373 370 * Disable the "OS" and "DD" timers - these are designed for Symbian!