aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/timer.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-05-12 16:20:36 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-05-12 16:20:36 -0400
commit15d2c83948a3f47095017dbcf2060132bcd8c00c (patch)
tree9652e40ee1a8fb09555bdeff645157a679577730 /arch/arm/mach-shmobile/timer.c
parente994d5eb7c3e45e13eb4fc882a47238f8dc4d63e (diff)
parent3b7b70552afe351a8bd8fff1eb2d60aab2206576 (diff)
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.c17
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 @@
19 * 19 *
20 */ 20 */
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <linux/delay.h>
22#include <asm/mach/time.h> 23#include <asm/mach/time.h>
23#include <asm/smp_twd.h> 24#include <asm/smp_twd.h>
24 25
26void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
27 unsigned int mult, unsigned int div)
28{
29 /* calculate a worst-case loops-per-jiffy value
30 * based on maximum cpu core mhz setting and the
31 * __delay() implementation in arch/arm/lib/delay.S
32 *
33 * this will result in a longer delay than expected
34 * when the cpu core runs on lower frequencies.
35 */
36
37 unsigned int value = (1000000 * mult) / (HZ * div);
38
39 lpj_fine = max_cpu_core_mhz * value;
40}
41
25static void __init shmobile_late_time_init(void) 42static void __init shmobile_late_time_init(void)
26{ 43{
27 /* 44 /*