summaryrefslogtreecommitdiff
path: root/drivers/marvell/aro.c
diff options
context:
space:
mode:
authorChristine Gharzuzi <chrisg@marvell.com>2017-07-18 16:48:36 +0300
committerKonstantin Porotchkin <kostap@marvell.com>2017-08-22 11:18:11 +0300
commit2f96d8db23767a0ee6ee8e241015b86c4415d696 (patch)
tree0a0d99b1209005835da19aae5d7766bbdd9f3bc0 /drivers/marvell/aro.c
parent0a3d45864894ce3e0375a7f476ea4709d0df5388 (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>
Diffstat (limited to 'drivers/marvell/aro.c')
-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 {