{
struct device_node *node = info->dev->of_node;
struct cpufreq_frequency_table *ft, *ret = NULL;
+ int len, num, i = 0, k;
struct property *pp;
- int len, num, i = 0;
u32 *of_f_tab;
if (!node)
}
/*
- * Here + 2 is required for CPUFREQ_ENTRY_INVALID and
- * CPUFREQ_TABLE_END
+ * Here + 1 is required for CPUFREQ_TABLE_END
*
* Number of those entries must correspond to the apll_freq_4412 table
*/
- ft = kzalloc(sizeof(struct cpufreq_frequency_table) * (num + 2),
- GFP_KERNEL);
+ ft = kzalloc(sizeof(struct cpufreq_frequency_table) *
+ (info->freq_levels + 1), GFP_KERNEL);
if (!ft) {
pr_err("%s: Allocation failed\n", __func__);
goto err_of_f_tab;
}
- ft[0].index = L0;
- ft[0].frequency = CPUFREQ_ENTRY_INVALID;
+ i = info->freq_levels;
+ ft[i].index = 0;
+ ft[i].frequency = CPUFREQ_TABLE_END;
- for (i = 1; i <= num; i++) {
+ for (i--, k = num - 1; i >= 0; i--, k--) {
ft[i].index = i;
- ft[i].frequency = of_f_tab[i-1];
+ if (k < 0)
+ ft[i].frequency = CPUFREQ_ENTRY_INVALID;
+ else
+ ft[i].frequency = of_f_tab[k];
}
- ft[i].index = 0;
- ft[i].frequency = CPUFREQ_TABLE_END;
-
ret = ft;
err_of_f_tab:
static struct clk *mout_apll;
static unsigned int exynos4x12_volt_table[] = {
- 1350000, 1287500, 1250000, 1187500, 1137500, 1087500, 1037500,
- 1000000, 987500, 975000, 950000, 925000, 900000, 900000
+ 1400000, 1350000, 1350000, 1300000, 1225000, 1175000,
+ 1125000, 1075000, 1037500, 1012500, 1000000, 987500,
+ 975000, 925000, 925000, 925000, 900000
};
static struct cpufreq_frequency_table exynos4x12_freq_table[] = {
* clock divider for COPY, HPM, CORES
* PLL M, P, S
*/
+ APLL_FREQ(1800, 0, 3, 7, 0, 6, 1, 2, 0, 7, 0, 7, 300, 4, 0),
+ APLL_FREQ(1704, 0, 3, 7, 0, 6, 1, 2, 0, 7, 0, 7, 213, 3, 0),
+ APLL_FREQ(1600, 0, 3, 7, 0, 6, 1, 2, 0, 6, 0, 7, 200, 3, 0),
APLL_FREQ(1500, 0, 3, 7, 0, 6, 1, 2, 0, 6, 0, 7, 250, 4, 0),
APLL_FREQ(1400, 0, 3, 7, 0, 6, 1, 2, 0, 6, 0, 6, 175, 3, 0),
APLL_FREQ(1300, 0, 3, 7, 0, 5, 1, 2, 0, 5, 0, 6, 325, 6, 0),
if (IS_ERR(mout_apll))
goto err_mout_apll;
- if (soc_is_exynos4212())
+ if (soc_is_exynos4212()) {
+ info->freq_levels = ARRAY_SIZE(apll_freq_4212);
apll_freq_4x12 = apll_freq_4212;
- else
+ } else {
+ info->freq_levels = ARRAY_SIZE(apll_freq_4412);
apll_freq_4x12 = apll_freq_4412;
+ }
info->mpll_freq_khz = rate;
/* 800Mhz */