diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-05-12 22:20:36 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-05-12 22:20:36 +0200 |
commit | 15d2c83948a3f47095017dbcf2060132bcd8c00c (patch) | |
tree | 9652e40ee1a8fb09555bdeff645157a679577730 /arch/arm/mach-shmobile/timer.c | |
parent | ARM / mach-shmobile: Invalidate caches when booting secondary cores (diff) | |
parent | ARM: mach-shmobile: sh7372 generic board support via DT V2 (diff) | |
download | linux-15d2c83948a3f47095017dbcf2060132bcd8c00c.tar.xz linux-15d2c83948a3f47095017dbcf2060132bcd8c00c.zip |
Merge branch 'renesas-dt' into renesas-soc-core
* renesas-dt:
ARM: mach-shmobile: sh7372 generic board support via DT V2
ARM: mach-shmobile: Rework sh7372 INTCS demuxer V2
ARM: mach-shmobile: Use INTC_IRQ_PINS_16H on sh7372
ARM: mach-shmobile: Use 0x3400 as INTCS vector offset
ARM: mach-shmobile: Introduce INTC_IRQ_PINS_16H
ARM: mach-shmobile: Introduce shmobile_setup_delay()
Diffstat (limited to 'arch/arm/mach-shmobile/timer.c')
-rw-r--r-- | arch/arm/mach-shmobile/timer.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 8b79e7917a23..cba39d866687 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c @@ -19,9 +19,26 @@ * */ #include <linux/platform_device.h> +#include <linux/delay.h> #include <asm/mach/time.h> #include <asm/smp_twd.h> +void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz, + unsigned int mult, unsigned int div) +{ + /* calculate a worst-case loops-per-jiffy value + * based on maximum cpu core mhz setting and the + * __delay() implementation in arch/arm/lib/delay.S + * + * this will result in a longer delay than expected + * when the cpu core runs on lower frequencies. + */ + + unsigned int value = (1000000 * mult) / (HZ * div); + + lpj_fine = max_cpu_core_mhz * value; +} + static void __init shmobile_late_time_init(void) { /* |