]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM / mach-shmobile: Use preset_lpj with calibrate_delay()
authorMagnus Damm <damm@opensource.se>
Wed, 9 May 2012 22:37:48 +0000 (00:37 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sat, 12 May 2012 20:21:36 +0000 (22:21 +0200)
Update the mach-shmobile shared delay calibration code for late
timers. All existing in-tree non-DT socs are however using early
timers today and they are unaffected by this change.

The patch modifies shmobile_setup_delay() from using lpj_fine
to preset_lpj. This change allows us to preset the worst case
loops-per-jiffy value to all CPU cores on the system.

The old code which made use of lpj_fine did not affect the
secondary CPU cores which made it impossible to boot on SMP
without early timers.

Needed for SMP SoCs using late timers like EMEV2 or any other
mach-shmobile SMP SoC that makes use of late timers via DT.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
arch/arm/mach-shmobile/timer.c

index cba39d866687ce3a6bcac62b79da731d8aa8502f..a68919727e24dddcd2431db2864d4f7dd6da15cb 100644 (file)
@@ -36,7 +36,8 @@ void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
 
        unsigned int value = (1000000 * mult) / (HZ * div);
 
-       lpj_fine = max_cpu_core_mhz * value;
+       if (!preset_lpj)
+               preset_lpj = max_cpu_core_mhz * value;
 }
 
 static void __init shmobile_late_time_init(void)