summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristine Gharzuzi <chrisg@marvell.com>2017-07-18 16:48:36 +0300
committerKostya Porotchkin <kostap@marvell.com>2017-07-18 15:14:20 +0300
commit46ddc17ce940cbdf216f3db66a69107fa4af1f95 (patch)
tree31c7ebec3e06eec40e1a0409d4979241a36419cb
parentc3099d02706d8868b2a966800dc8795c7dff9128 (diff)
fix: aro: Fix equation for cpu frequency calculation
wrong parentheses in the equations for calculating the clusters' frequency which caused booting to freeze when 2000 MHz frequency is chosen Change-Id: I47cd7b7368e4f07ff9e5d7ea55d845613e495558 Signed-off-by: Christine Gharzuzi <chrisg@marvell.com> Reviewed-on: http://vgitil04.il.marvell.com:8080/41780 Verified-Armada8K: Igal Liberman <igall@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com> Tested-by: iSoC Platform CI <ykjenk@marvell.com>
-rw-r--r--drivers/marvell/aro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/marvell/aro.c b/drivers/marvell/aro.c
index 72a1bcbf..bc0fbe70 100644
--- a/drivers/marvell/aro.c
+++ b/drivers/marvell/aro.c
@@ -318,7 +318,7 @@ int init_aro(void)
if (target_freq == (2000) || target_freq == (1800)) {
max_freq_guardeband = 200;
ref_counter_init_val = 5;
- cpu_counter_init_val = ((target_freq - max_freq_guardeband) / (25 * ref_counter_init_val));
+ cpu_counter_init_val = (((target_freq - max_freq_guardeband) / 25) * ref_counter_init_val);
start_aro_mode(ref_counter_init_val, cpu_counter_init_val);
/* CPU is now running in ARO mode*/
@@ -326,7 +326,7 @@ int init_aro(void)
/* update the Ref count to higher value to gain accuracy. */
ref_counter_init_val = 10000;
- cpu_counter_init_val = (target_freq / 25 * (ref_counter_init_val));
+ cpu_counter_init_val = ((target_freq / 25) * (ref_counter_init_val));
start_aro_mode(ref_counter_init_val, cpu_counter_init_val);
} else {