keystone2: use correct EFUSE_BOOTROM fileds to configure speed
authorVitaly Andrianov <vitalya@ti.com>
Mon, 15 Jun 2015 12:54:15 +0000 (08:54 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 19 Jun 2015 20:46:46 +0000 (16:46 -0400)
The get_max_arm_speed() and get_max_dev_speed() used wrong register
fields to get the maximum speeds. This commit fixes the bug.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/mach-keystone/clock.c

index d13fbc1a4bb99cb4e59bb62663644e7462e58cba..625907fcda31d6a8aacdad9766edf5d1b4641fc8 100644 (file)
@@ -246,18 +246,18 @@ static inline u32 read_efuse_bootrom(void)
 }
 #endif
 
-inline int get_max_dev_speed(void)
-{
-       return get_max_speed(read_efuse_bootrom() & 0xffff, dev_speeds);
-}
-
 #ifndef CONFIG_SOC_K2E
 inline int get_max_arm_speed(void)
 {
-       return get_max_speed((read_efuse_bootrom() >> 16) & 0xffff, arm_speeds);
+       return get_max_speed(read_efuse_bootrom() & 0xffff, arm_speeds);
 }
 #endif
 
+inline int get_max_dev_speed(void)
+{
+       return get_max_speed((read_efuse_bootrom() >> 16) & 0xffff, dev_speeds);
+}
+
 void pass_pll_pa_clk_enable(void)
 {
        u32 reg;