diff options
author | Jonghwan Choi <jhbird.choi@samsung.com> | 2014-05-16 19:19:30 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-05-25 15:05:01 -0400 |
commit | be1f7c8d7e2bc8b8c76846aa6f276e8d2ef8975a (patch) | |
tree | 3597f76be0d9453f2d0a7aa2255716fa63a10daa /drivers/cpufreq/exynos4x12-cpufreq.c | |
parent | 2cd62bd4e5226ae5fa61f58ade8148f2e4643335 (diff) |
cpufreq: exynos: Fix the compile error
Commit 7da83a80 ("ARM: EXYNOS: Migrate Exynos specific macros from
plat to mach") which lands in samsung tree causes build breakage
for cpufreq-exynos like following:
drivers/cpufreq/exynos-cpufreq.c: In function 'exynos_cpufreq_probe':
drivers/cpufreq/exynos-cpufreq.c:166:2: error: implicit declaration of function 'soc_is_exynos4210'
[-Werror=implicit-function-declaration]
drivers/cpufreq/exynos-cpufreq.c:168:2: error: implicit declaration of function 'soc_is_exynos4212'
[-Werror=implicit-function-declaration]
drivers/cpufreq/exynos-cpufreq.c:168:2: error: implicit declaration of function 'soc_is_exynos4412'
[-Werror=implicit-function-declaration]
drivers/cpufreq/exynos-cpufreq.c:170:2: error: implicit declaration of function 'soc_is_exynos5250'
[-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [drivers/cpufreq/exynos-cpufreq.o] Error 1
make[2]: *** Waiting for unfinished jobs....
drivers/cpufreq/exynos4x12-cpufreq.c: In function 'exynos4x12_set_clkdiv':
drivers/cpufreq/exynos4x12-cpufreq.c:118:2: error: implicit declaration of function 'soc_is_exynos4212'
[-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [drivers/cpufreq/exynos4x12-cpufreq.o] Error 1
make[1]: *** [drivers/cpufreq] Error 2
This fixes above error with getting SoC information via
of_machine_is_compatible() instead of soc_is_exynosXXXX().
Suggested-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
[kgene.kim@samsung.com: fixed typo and modified as per Viresh's suggestion]
[kgene.kim@samsung.com: Rafael agreed]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'drivers/cpufreq/exynos4x12-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/exynos4x12-cpufreq.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/cpufreq/exynos4x12-cpufreq.c b/drivers/cpufreq/exynos4x12-cpufreq.c index 466c76ad335b..63a3907ce578 100644 --- a/drivers/cpufreq/exynos4x12-cpufreq.c +++ b/drivers/cpufreq/exynos4x12-cpufreq.c | |||
@@ -100,7 +100,6 @@ static struct apll_freq apll_freq_4412[] = { | |||
100 | static void exynos4x12_set_clkdiv(unsigned int div_index) | 100 | static void exynos4x12_set_clkdiv(unsigned int div_index) |
101 | { | 101 | { |
102 | unsigned int tmp; | 102 | unsigned int tmp; |
103 | unsigned int stat_cpu1; | ||
104 | 103 | ||
105 | /* Change Divider - CPU0 */ | 104 | /* Change Divider - CPU0 */ |
106 | 105 | ||
@@ -115,13 +114,11 @@ static void exynos4x12_set_clkdiv(unsigned int div_index) | |||
115 | tmp = apll_freq_4x12[div_index].clk_div_cpu1; | 114 | tmp = apll_freq_4x12[div_index].clk_div_cpu1; |
116 | 115 | ||
117 | __raw_writel(tmp, EXYNOS4_CLKDIV_CPU1); | 116 | __raw_writel(tmp, EXYNOS4_CLKDIV_CPU1); |
118 | if (soc_is_exynos4212()) | ||
119 | stat_cpu1 = 0x11; | ||
120 | else | ||
121 | stat_cpu1 = 0x111; | ||
122 | 117 | ||
123 | while (__raw_readl(EXYNOS4_CLKDIV_STATCPU1) & stat_cpu1) | 118 | do { |
124 | cpu_relax(); | 119 | cpu_relax(); |
120 | tmp = __raw_readl(EXYNOS4_CLKDIV_STATCPU1); | ||
121 | } while (tmp != 0x0); | ||
125 | } | 122 | } |
126 | 123 | ||
127 | static void exynos4x12_set_apll(unsigned int index) | 124 | static void exynos4x12_set_apll(unsigned int index) |
@@ -184,7 +181,7 @@ int exynos4x12_cpufreq_init(struct exynos_dvfs_info *info) | |||
184 | if (IS_ERR(mout_apll)) | 181 | if (IS_ERR(mout_apll)) |
185 | goto err_mout_apll; | 182 | goto err_mout_apll; |
186 | 183 | ||
187 | if (soc_is_exynos4212()) | 184 | if (info->type == EXYNOS_SOC_4212) |
188 | apll_freq_4x12 = apll_freq_4212; | 185 | apll_freq_4x12 = apll_freq_4212; |
189 | else | 186 | else |
190 | apll_freq_4x12 = apll_freq_4412; | 187 | apll_freq_4x12 = apll_freq_4412; |