Commit 90d5d0a119bcf189e8b33f776b4f8371b789b311
Committed by
Dave Jones
1 parent
fb3b1fefaa
Exists in
master
and in
4 other branches
[CPUFREQ] S5PV210: Add additional symantics for "relation" in cpufreq with pm
Relation has an additional symantics other than standard. s5pv310_target funtion have below additional relation. - DISABLE_FURTHER_CPUFREQ : disable further access to target - ENABLE_FURTHER_CPUFRER : enable access to target Signed-off-by: Huisung Kang <hs1218.kang@samsung.com> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Dave Jones <davej@redhat.com>
Showing 1 changed file with 28 additions and 0 deletions Side-by-side Diff
drivers/cpufreq/s5pv210-cpufreq.c
... | ... | @@ -30,6 +30,18 @@ |
30 | 30 | #define APLL_VAL_800 ((1 << 31) | (100 << 16) | (3 << 8) | 1) |
31 | 31 | |
32 | 32 | /* |
33 | + * relation has an additional symantics other than the standard of cpufreq | |
34 | + * DISALBE_FURTHER_CPUFREQ: disable further access to target | |
35 | + * ENABLE_FURTUER_CPUFREQ: enable access to target | |
36 | + */ | |
37 | +enum cpufreq_access { | |
38 | + DISABLE_FURTHER_CPUFREQ = 0x10, | |
39 | + ENABLE_FURTHER_CPUFREQ = 0x20, | |
40 | +}; | |
41 | + | |
42 | +static bool no_cpufreq_access; | |
43 | + | |
44 | +/* | |
33 | 45 | * DRAM configurations to calculate refresh counter for changing |
34 | 46 | * frequency of memory. |
35 | 47 | */ |
... | ... | @@ -145,6 +157,22 @@ |
145 | 157 | unsigned int index, priv_index; |
146 | 158 | unsigned int pll_changing = 0; |
147 | 159 | unsigned int bus_speed_changing = 0; |
160 | + | |
161 | + if (relation & ENABLE_FURTHER_CPUFREQ) | |
162 | + no_cpufreq_access = false; | |
163 | + | |
164 | + if (no_cpufreq_access) { | |
165 | +#ifdef CONFIG_PM_VERBOSE | |
166 | + pr_err("%s:%d denied access to %s as it is disabled" | |
167 | + "temporarily\n", __FILE__, __LINE__, __func__); | |
168 | +#endif | |
169 | + return -EINVAL; | |
170 | + } | |
171 | + | |
172 | + if (relation & DISABLE_FURTHER_CPUFREQ) | |
173 | + no_cpufreq_access = true; | |
174 | + | |
175 | + relation &= ~(ENABLE_FURTHER_CPUFREQ | DISABLE_FURTHER_CPUFREQ); | |
148 | 176 | |
149 | 177 | freqs.old = s5pv210_getspeed(0); |
150 | 178 |