linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: shmobile: Fix wrong calculation in shmobile_init_delay()
@ 2014-09-12  8:02 Khiem Nguyen
  2014-09-18  5:24 ` Khiem Nguyen
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Khiem Nguyen @ 2014-09-12  8:02 UTC (permalink / raw)
  To: linux-sh

The processing to get CPU information loop on all available CPUs
and decide whether calculating preset_lpj for for CA15 or CA7/8/9.
The calculation will go for CA7/8/9 prior to CA15.

The commit 0dc50fd ARM: shmobile: support Cortex-A7 in shmobile_init_delay()
introduced wrong CPU selection in case CA15 and CA7/8/9 coexist, e.g R-CarH2.
At the end, it leads to the wrong calculation of preset_lpj for R-CarH2.

Fix it by selecting the first CPU in DTS file.

Signed-off-by: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
---
 arch/arm/mach-shmobile/timer.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
index 87c6be1..9394cad 100644
--- a/arch/arm/mach-shmobile/timer.c
+++ b/arch/arm/mach-shmobile/timer.c
@@ -59,10 +59,14 @@ void __init shmobile_init_delay(void)
 
 		if (of_device_is_compatible(np, "arm,cortex-a7") ||
 		    of_device_is_compatible(np, "arm,cortex-a8") ||
-		    of_device_is_compatible(np, "arm,cortex-a9"))
+		    of_device_is_compatible(np, "arm,cortex-a9")) {
 			is_a7_a8_a9 = true;
-		else if (of_device_is_compatible(np, "arm,cortex-a15"))
+			break;
+		}
+		else if (of_device_is_compatible(np, "arm,cortex-a15")) {
 			is_a15 = true;
+			break;
+		}
 	}
 
 	of_node_put(cpus);
-- 
1.7.9.5

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

end of thread, other threads:[~2014-09-19  6:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-12  8:02 [PATCH] ARM: shmobile: Fix wrong calculation in shmobile_init_delay() Khiem Nguyen
2014-09-18  5:24 ` Khiem Nguyen
2014-09-18  9:12 ` Simon Horman
2014-09-19  1:04 ` Magnus Damm
2014-09-19  1:57 ` Khiem Nguyen
2014-09-19  6:07 ` Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).