diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-14 16:22:57 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-14 16:22:57 -0400 |
commit | 361c2cb54a5614941f5898880a4085d31da9872b (patch) | |
tree | 3c042cbcc6a654914bcd2d96294f76ecdde219ca | |
parent | c49a089c3eedbc4b3fa9c3d469599a6c14dea4c5 (diff) | |
parent | 45e12086263a53f16b489fc7f4f8f6348a688661 (diff) |
Merge branch 'cpufreq-fixes' of git://git.linaro.org/people/vireshk/linux into pm-cpufreq
Pull ARM cpufreq fixes from Viresh Kumar.
* 'cpufreq-fixes' of git://git.linaro.org/people/vireshk/linux:
cpufreq: fix EXYNOS drivers selection
cpufreq: exynos5440: Fix to skip when new frequency same as current
-rw-r--r-- | drivers/cpufreq/Kconfig.arm | 36 | ||||
-rw-r--r-- | drivers/cpufreq/exynos-cpufreq.c | 1 | ||||
-rw-r--r-- | drivers/cpufreq/exynos-cpufreq.h | 21 | ||||
-rw-r--r-- | drivers/cpufreq/exynos5440-cpufreq.c | 3 |
4 files changed, 48 insertions, 13 deletions
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index de4d5d93c3fd..0fa204b244bd 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm | |||
@@ -17,37 +17,47 @@ config ARM_DT_BL_CPUFREQ | |||
17 | big.LITTLE platform. This gets frequency tables from DT. | 17 | big.LITTLE platform. This gets frequency tables from DT. |
18 | 18 | ||
19 | config ARM_EXYNOS_CPUFREQ | 19 | config ARM_EXYNOS_CPUFREQ |
20 | bool "SAMSUNG EXYNOS SoCs" | 20 | bool |
21 | depends on ARCH_EXYNOS | ||
22 | select CPU_FREQ_TABLE | 21 | select CPU_FREQ_TABLE |
23 | default y | ||
24 | help | ||
25 | This adds the CPUFreq driver common part for Samsung | ||
26 | EXYNOS SoCs. | ||
27 | |||
28 | If in doubt, say N. | ||
29 | 22 | ||
30 | config ARM_EXYNOS4210_CPUFREQ | 23 | config ARM_EXYNOS4210_CPUFREQ |
31 | def_bool CPU_EXYNOS4210 | 24 | bool "SAMSUNG EXYNOS4210" |
25 | depends on CPU_EXYNOS4210 | ||
26 | default y | ||
27 | select ARM_EXYNOS_CPUFREQ | ||
32 | help | 28 | help |
33 | This adds the CPUFreq driver for Samsung EXYNOS4210 | 29 | This adds the CPUFreq driver for Samsung EXYNOS4210 |
34 | SoC (S5PV310 or S5PC210). | 30 | SoC (S5PV310 or S5PC210). |
35 | 31 | ||
32 | If in doubt, say N. | ||
33 | |||
36 | config ARM_EXYNOS4X12_CPUFREQ | 34 | config ARM_EXYNOS4X12_CPUFREQ |
37 | def_bool (SOC_EXYNOS4212 || SOC_EXYNOS4412) | 35 | bool "SAMSUNG EXYNOS4x12" |
36 | depends on (SOC_EXYNOS4212 || SOC_EXYNOS4412) | ||
37 | default y | ||
38 | select ARM_EXYNOS_CPUFREQ | ||
38 | help | 39 | help |
39 | This adds the CPUFreq driver for Samsung EXYNOS4X12 | 40 | This adds the CPUFreq driver for Samsung EXYNOS4X12 |
40 | SoC (EXYNOS4212 or EXYNOS4412). | 41 | SoC (EXYNOS4212 or EXYNOS4412). |
41 | 42 | ||
43 | If in doubt, say N. | ||
44 | |||
42 | config ARM_EXYNOS5250_CPUFREQ | 45 | config ARM_EXYNOS5250_CPUFREQ |
43 | def_bool SOC_EXYNOS5250 | 46 | bool "SAMSUNG EXYNOS5250" |
47 | depends on SOC_EXYNOS5250 | ||
48 | default y | ||
49 | select ARM_EXYNOS_CPUFREQ | ||
44 | help | 50 | help |
45 | This adds the CPUFreq driver for Samsung EXYNOS5250 | 51 | This adds the CPUFreq driver for Samsung EXYNOS5250 |
46 | SoC. | 52 | SoC. |
47 | 53 | ||
54 | If in doubt, say N. | ||
55 | |||
48 | config ARM_EXYNOS5440_CPUFREQ | 56 | config ARM_EXYNOS5440_CPUFREQ |
49 | def_bool SOC_EXYNOS5440 | 57 | bool "SAMSUNG EXYNOS5440" |
58 | depends on SOC_EXYNOS5440 | ||
50 | depends on HAVE_CLK && PM_OPP && OF | 59 | depends on HAVE_CLK && PM_OPP && OF |
60 | default y | ||
51 | select CPU_FREQ_TABLE | 61 | select CPU_FREQ_TABLE |
52 | help | 62 | help |
53 | This adds the CPUFreq driver for Samsung EXYNOS5440 | 63 | This adds the CPUFreq driver for Samsung EXYNOS5440 |
@@ -55,6 +65,8 @@ config ARM_EXYNOS5440_CPUFREQ | |||
55 | different than previous exynos controllers so not using | 65 | different than previous exynos controllers so not using |
56 | the common exynos framework. | 66 | the common exynos framework. |
57 | 67 | ||
68 | If in doubt, say N. | ||
69 | |||
58 | config ARM_HIGHBANK_CPUFREQ | 70 | config ARM_HIGHBANK_CPUFREQ |
59 | tristate "Calxeda Highbank-based" | 71 | tristate "Calxeda Highbank-based" |
60 | depends on ARCH_HIGHBANK | 72 | depends on ARCH_HIGHBANK |
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 366475161c76..0fac34439e31 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c | |||
@@ -332,7 +332,6 @@ err_cpufreq: | |||
332 | regulator_put(arm_regulator); | 332 | regulator_put(arm_regulator); |
333 | err_vdd_arm: | 333 | err_vdd_arm: |
334 | kfree(exynos_info); | 334 | kfree(exynos_info); |
335 | pr_debug("%s: failed initialization\n", __func__); | ||
336 | return -EINVAL; | 335 | return -EINVAL; |
337 | } | 336 | } |
338 | late_initcall(exynos_cpufreq_init); | 337 | late_initcall(exynos_cpufreq_init); |
diff --git a/drivers/cpufreq/exynos-cpufreq.h b/drivers/cpufreq/exynos-cpufreq.h index 92b852ee5ddc..7f25cee8cec2 100644 --- a/drivers/cpufreq/exynos-cpufreq.h +++ b/drivers/cpufreq/exynos-cpufreq.h | |||
@@ -43,6 +43,27 @@ struct exynos_dvfs_info { | |||
43 | bool (*need_apll_change)(unsigned int, unsigned int); | 43 | bool (*need_apll_change)(unsigned int, unsigned int); |
44 | }; | 44 | }; |
45 | 45 | ||
46 | #ifdef CONFIG_ARM_EXYNOS4210_CPUFREQ | ||
46 | extern int exynos4210_cpufreq_init(struct exynos_dvfs_info *); | 47 | extern int exynos4210_cpufreq_init(struct exynos_dvfs_info *); |
48 | #else | ||
49 | static inline int exynos4210_cpufreq_init(struct exynos_dvfs_info *info) | ||
50 | { | ||
51 | return -EOPNOTSUPP; | ||
52 | } | ||
53 | #endif | ||
54 | #ifdef CONFIG_ARM_EXYNOS4X12_CPUFREQ | ||
47 | extern int exynos4x12_cpufreq_init(struct exynos_dvfs_info *); | 55 | extern int exynos4x12_cpufreq_init(struct exynos_dvfs_info *); |
56 | #else | ||
57 | static inline int exynos4x12_cpufreq_init(struct exynos_dvfs_info *info) | ||
58 | { | ||
59 | return -EOPNOTSUPP; | ||
60 | } | ||
61 | #endif | ||
62 | #ifdef CONFIG_ARM_EXYNOS5250_CPUFREQ | ||
48 | extern int exynos5250_cpufreq_init(struct exynos_dvfs_info *); | 63 | extern int exynos5250_cpufreq_init(struct exynos_dvfs_info *); |
64 | #else | ||
65 | static inline int exynos5250_cpufreq_init(struct exynos_dvfs_info *info) | ||
66 | { | ||
67 | return -EOPNOTSUPP; | ||
68 | } | ||
69 | #endif | ||
diff --git a/drivers/cpufreq/exynos5440-cpufreq.c b/drivers/cpufreq/exynos5440-cpufreq.c index 0c74018eda47..d514c152fd1a 100644 --- a/drivers/cpufreq/exynos5440-cpufreq.c +++ b/drivers/cpufreq/exynos5440-cpufreq.c | |||
@@ -238,6 +238,9 @@ static int exynos_target(struct cpufreq_policy *policy, | |||
238 | freqs.old = dvfs_info->cur_frequency; | 238 | freqs.old = dvfs_info->cur_frequency; |
239 | freqs.new = freq_table[index].frequency; | 239 | freqs.new = freq_table[index].frequency; |
240 | 240 | ||
241 | if (freqs.old == freqs.new) | ||
242 | goto out; | ||
243 | |||
241 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); | 244 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); |
242 | 245 | ||
243 | /* Set the target frequency in all C0_3_PSTATE register */ | 246 | /* Set the target frequency in all C0_3_PSTATE register */ |