From: 黄涛 Date: Mon, 21 Jan 2013 02:06:05 +0000 (+0800) Subject: rk: add ddr_set_rate to ddr.h X-Git-Tag: firefly_0821_release~7887 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8550ec31cdccb2b4a41b6f37244829e838868aef;p=firefly-linux-kernel-4.4.55.git rk: add ddr_set_rate to ddr.h --- diff --git a/arch/arm/mach-rk2928/cpufreq.c b/arch/arm/mach-rk2928/cpufreq.c index 099d24ea6931..7d9da019ae33 100755 --- a/arch/arm/mach-rk2928/cpufreq.c +++ b/arch/arm/mach-rk2928/cpufreq.c @@ -221,16 +221,14 @@ static int rk30_verify_speed(struct cpufreq_policy *policy) return cpufreq_frequency_table_verify(policy, freq_table); } - -uint32_t ddr_set_rate(uint32_t nMHz); - -int ddr_scale_rate_for_dvfs(struct clk *clk, unsigned long rate, dvfs_set_rate_callback set_rate) +static int ddr_scale_rate_for_dvfs(struct clk *clk, unsigned long rate, dvfs_set_rate_callback set_rate) { #if defined (CONFIG_DDR_FREQ) ddr_set_rate(rate/(1000*1000)); #endif return 0; } + static int rk30_cpu_init(struct cpufreq_policy *policy) { if (policy->cpu == 0) { diff --git a/arch/arm/mach-rk30/cpufreq.c b/arch/arm/mach-rk30/cpufreq.c index dbf12d516878..047d61f2df05 100644 --- a/arch/arm/mach-rk30/cpufreq.c +++ b/arch/arm/mach-rk30/cpufreq.c @@ -239,9 +239,7 @@ static int rk30_verify_speed(struct cpufreq_policy *policy) return cpufreq_frequency_table_verify(policy, freq_table); } -uint32_t ddr_set_rate(uint32_t nMHz); - -int ddr_scale_rate_for_dvfs(struct clk *clk, unsigned long rate, dvfs_set_rate_callback set_rate) +static int ddr_scale_rate_for_dvfs(struct clk *clk, unsigned long rate, dvfs_set_rate_callback set_rate) { #if defined (CONFIG_DDR_FREQ) ddr_set_rate(rate/(1000*1000)); diff --git a/arch/arm/plat-rk/include/plat/ddr.h b/arch/arm/plat-rk/include/plat/ddr.h index 39eb210bfafb..8364ded9577e 100644 --- a/arch/arm/plat-rk/include/plat/ddr.h +++ b/arch/arm/plat-rk/include/plat/ddr.h @@ -151,6 +151,6 @@ uint32_t ddr_get_cap(void); int ddr_init(uint32_t dram_type, uint32_t freq); void ddr_set_auto_self_refresh(bool en); uint32_t __sramlocalfunc ddr_set_pll(uint32_t nMHz, uint32_t set); - +uint32_t ddr_set_rate(uint32_t nMHz); #endif