aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-common
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/mach-common')
-rw-r--r--arch/blackfin/mach-common/cpufreq.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c
index c854a27cbeab..65a4511e1d1f 100644
--- a/arch/blackfin/mach-common/cpufreq.c
+++ b/arch/blackfin/mach-common/cpufreq.c
@@ -77,15 +77,14 @@ static void __init bfin_init_tables(unsigned long cclk, unsigned long sclk)
77 csel = bfin_read32(CGU0_DIV) & 0x1F; 77 csel = bfin_read32(CGU0_DIV) & 0x1F;
78#endif 78#endif
79 79
80 for (index = 0; (cclk >> index) >= min_cclk && csel <= 3; index++, csel++) { 80 for (index = 0; (cclk >> index) >= min_cclk && csel <= 3 && index < 3; index++, csel++) {
81 bfin_freq_table[index].frequency = cclk >> index; 81 bfin_freq_table[index].frequency = cclk >> index;
82#ifndef CONFIG_BF60x 82#ifndef CONFIG_BF60x
83 dpm_state_table[index].csel = csel << 4; /* Shift now into PLL_DIV bitpos */ 83 dpm_state_table[index].csel = csel << 4; /* Shift now into PLL_DIV bitpos */
84 dpm_state_table[index].tscale = (TIME_SCALE / (1 << csel)) - 1;
85#else 84#else
86 dpm_state_table[index].csel = csel; 85 dpm_state_table[index].csel = csel;
87 dpm_state_table[index].tscale = TIME_SCALE >> index;
88#endif 86#endif
87 dpm_state_table[index].tscale = (TIME_SCALE >> index) - 1;
89 88
90 pr_debug("cpufreq: freq:%d csel:0x%x tscale:%d\n", 89 pr_debug("cpufreq: freq:%d csel:0x%x tscale:%d\n",
91 bfin_freq_table[index].frequency, 90 bfin_freq_table[index].frequency,