SUPERH platform development
 help / color / mirror / Atom feed
* [PATCH] mach-shmobile: Use preset_lpj with calibrate_delay()
@ 2012-05-09  7:11 Magnus Damm
  2012-05-09 22:48 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2012-05-09  7:11 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

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>
---

 arch/arm/mach-shmobile/timer.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- 0003/arch/arm/mach-shmobile/timer.c
+++ work/arch/arm/mach-shmobile/timer.c	2012-05-08 18:56:03.000000000 +0900
@@ -36,7 +36,8 @@ void __init shmobile_setup_delay(unsigne
 
 	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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mach-shmobile: Use preset_lpj with calibrate_delay()
  2012-05-09  7:11 [PATCH] mach-shmobile: Use preset_lpj with calibrate_delay() Magnus Damm
@ 2012-05-09 22:48 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2012-05-09 22:48 UTC (permalink / raw)
  To: linux-sh

On Wednesday, May 09, 2012, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> 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>

Applied to the soc branch of the renesas.git tree.

Thanks,
Rafael


> ---
> 
>  arch/arm/mach-shmobile/timer.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- 0003/arch/arm/mach-shmobile/timer.c
> +++ work/arch/arm/mach-shmobile/timer.c	2012-05-08 18:56:03.000000000 +0900
> @@ -36,7 +36,8 @@ void __init shmobile_setup_delay(unsigne
>  
>  	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)
> 
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-09 22:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-09  7:11 [PATCH] mach-shmobile: Use preset_lpj with calibrate_delay() Magnus Damm
2012-05-09 22:48 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox