From: chenxing Date: Wed, 19 Jun 2013 02:56:09 +0000 (+0800) Subject: rk3188: enable dvfs clk after adjust dvfs table X-Git-Tag: firefly_0821_release~6965^2~58 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=16d40d66955a7471f6a9ee06c343a3a5af6354b6;p=firefly-linux-kernel-4.4.55.git rk3188: enable dvfs clk after adjust dvfs table --- diff --git a/arch/arm/mach-rk3188/cpufreq.c b/arch/arm/mach-rk3188/cpufreq.c index 599fe9cae0fe..520cb1d15819 100644 --- a/arch/arm/mach-rk3188/cpufreq.c +++ b/arch/arm/mach-rk3188/cpufreq.c @@ -350,15 +350,12 @@ static int rk3188_cpufreq_init_cpu0(struct cpufreq_policy *policy) gpu_is_mali400 = cpu_is_rk3188(); gpu_clk = clk_get(NULL, "gpu"); - if (!IS_ERR(gpu_clk)) { - clk_enable_dvfs(gpu_clk); - if (gpu_is_mali400) - dvfs_clk_enable_limit(gpu_clk, 133000000, 600000000); - } + if (IS_ERR(gpu_clk)) + return PTR_ERR(gpu_clk); ddr_clk = clk_get(NULL, "ddr"); - if (!IS_ERR(ddr_clk)) - clk_enable_dvfs(ddr_clk); + if (IS_ERR(ddr_clk)) + return PTR_ERR(ddr_clk); cpu_clk = clk_get(NULL, "cpu"); if (IS_ERR(cpu_clk)) @@ -372,6 +369,12 @@ static int rk3188_cpufreq_init_cpu0(struct cpufreq_policy *policy) dvfs_adjust_table_lmtvolt(gpu_clk, table_adjust); } + clk_enable_dvfs(gpu_clk); + if (gpu_is_mali400) + dvfs_clk_enable_limit(gpu_clk, 133000000, 600000000); + + clk_enable_dvfs(ddr_clk); + dvfs_clk_register_set_rate_callback(cpu_clk, cpufreq_scale_rate_for_dvfs); freq_table = dvfs_get_freq_volt_table(cpu_clk); if (freq_table == NULL) {