diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-05-01 04:34:00 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-05-04 18:49:37 -0400 |
commit | 52352558d288c3dd5aa40f3bbf736fc005e17f7c (patch) | |
tree | 61fbbb2467e0e91e07291bc344dcb71616e2b0b3 /drivers/cpufreq/pxa2xx-cpufreq.c | |
parent | 5ebe6afaf0057ac3eaeb98defd5456894b446d22 (diff) |
cpufreq: pxa: replace typedef pxa_freqs_t by structure
typedef is not really useful here. Replace it by structure
to improve readability. typedef should only be used in some cases.
(See Documentation/CodingStyle Chapter 5 for details).
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/pxa2xx-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/pxa2xx-cpufreq.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index e24269ab4e9b..fcf6e342da4c 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c | |||
@@ -56,7 +56,7 @@ module_param(pxa27x_maxfreq, uint, 0); | |||
56 | MODULE_PARM_DESC(pxa27x_maxfreq, "Set the pxa27x maxfreq in MHz" | 56 | MODULE_PARM_DESC(pxa27x_maxfreq, "Set the pxa27x maxfreq in MHz" |
57 | "(typically 624=>pxa270, 416=>pxa271, 520=>pxa272)"); | 57 | "(typically 624=>pxa270, 416=>pxa271, 520=>pxa272)"); |
58 | 58 | ||
59 | typedef struct { | 59 | struct pxa_freqs { |
60 | unsigned int khz; | 60 | unsigned int khz; |
61 | unsigned int membus; | 61 | unsigned int membus; |
62 | unsigned int cccr; | 62 | unsigned int cccr; |
@@ -64,7 +64,7 @@ typedef struct { | |||
64 | unsigned int cclkcfg; | 64 | unsigned int cclkcfg; |
65 | int vmin; | 65 | int vmin; |
66 | int vmax; | 66 | int vmax; |
67 | } pxa_freqs_t; | 67 | }; |
68 | 68 | ||
69 | /* Define the refresh period in mSec for the SDRAM and the number of rows */ | 69 | /* Define the refresh period in mSec for the SDRAM and the number of rows */ |
70 | #define SDRAM_TREF 64 /* standard 64ms SDRAM */ | 70 | #define SDRAM_TREF 64 /* standard 64ms SDRAM */ |
@@ -86,7 +86,7 @@ static unsigned int sdram_rows; | |||
86 | /* Use the run mode frequencies for the CPUFREQ_POLICY_PERFORMANCE policy */ | 86 | /* Use the run mode frequencies for the CPUFREQ_POLICY_PERFORMANCE policy */ |
87 | #define CCLKCFG CCLKCFG_TURBO | CCLKCFG_FCS | 87 | #define CCLKCFG CCLKCFG_TURBO | CCLKCFG_FCS |
88 | 88 | ||
89 | static pxa_freqs_t pxa255_run_freqs[] = | 89 | static struct pxa_freqs pxa255_run_freqs[] = |
90 | { | 90 | { |
91 | /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ | 91 | /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ |
92 | { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ | 92 | { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ |
@@ -98,7 +98,7 @@ static pxa_freqs_t pxa255_run_freqs[] = | |||
98 | }; | 98 | }; |
99 | 99 | ||
100 | /* Use the turbo mode frequencies for the CPUFREQ_POLICY_POWERSAVE policy */ | 100 | /* Use the turbo mode frequencies for the CPUFREQ_POLICY_POWERSAVE policy */ |
101 | static pxa_freqs_t pxa255_turbo_freqs[] = | 101 | static struct pxa_freqs pxa255_turbo_freqs[] = |
102 | { | 102 | { |
103 | /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ | 103 | /* CPU MEMBUS CCCR DIV2 CCLKCFG run turbo PXbus SDRAM */ |
104 | { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ | 104 | { 99500, 99500, 0x121, 1, CCLKCFG, -1, -1}, /* 99, 99, 50, 50 */ |
@@ -153,7 +153,7 @@ MODULE_PARM_DESC(pxa255_turbo_table, "Selects the frequency table (0 = run table | |||
153 | ((HT) ? CCLKCFG_HALFTURBO : 0) | \ | 153 | ((HT) ? CCLKCFG_HALFTURBO : 0) | \ |
154 | ((T) ? CCLKCFG_TURBO : 0)) | 154 | ((T) ? CCLKCFG_TURBO : 0)) |
155 | 155 | ||
156 | static pxa_freqs_t pxa27x_freqs[] = { | 156 | static struct pxa_freqs pxa27x_freqs[] = { |
157 | {104000, 104000, PXA27x_CCCR(1, 8, 2), 0, CCLKCFG2(1, 0, 1), 900000, 1705000 }, | 157 | {104000, 104000, PXA27x_CCCR(1, 8, 2), 0, CCLKCFG2(1, 0, 1), 900000, 1705000 }, |
158 | {156000, 104000, PXA27x_CCCR(1, 8, 3), 0, CCLKCFG2(1, 0, 1), 1000000, 1705000 }, | 158 | {156000, 104000, PXA27x_CCCR(1, 8, 3), 0, CCLKCFG2(1, 0, 1), 1000000, 1705000 }, |
159 | {208000, 208000, PXA27x_CCCR(0, 16, 2), 1, CCLKCFG2(0, 0, 1), 1180000, 1705000 }, | 159 | {208000, 208000, PXA27x_CCCR(0, 16, 2), 1, CCLKCFG2(0, 0, 1), 1180000, 1705000 }, |
@@ -171,7 +171,7 @@ extern unsigned get_clk_frequency_khz(int info); | |||
171 | 171 | ||
172 | #ifdef CONFIG_REGULATOR | 172 | #ifdef CONFIG_REGULATOR |
173 | 173 | ||
174 | static int pxa_cpufreq_change_voltage(pxa_freqs_t *pxa_freq) | 174 | static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq) |
175 | { | 175 | { |
176 | int ret = 0; | 176 | int ret = 0; |
177 | int vmin, vmax; | 177 | int vmin, vmax; |
@@ -202,7 +202,7 @@ static void __init pxa_cpufreq_init_voltages(void) | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | #else | 204 | #else |
205 | static int pxa_cpufreq_change_voltage(pxa_freqs_t *pxa_freq) | 205 | static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq) |
206 | { | 206 | { |
207 | return 0; | 207 | return 0; |
208 | } | 208 | } |
@@ -211,7 +211,7 @@ static void __init pxa_cpufreq_init_voltages(void) { } | |||
211 | #endif | 211 | #endif |
212 | 212 | ||
213 | static void find_freq_tables(struct cpufreq_frequency_table **freq_table, | 213 | static void find_freq_tables(struct cpufreq_frequency_table **freq_table, |
214 | pxa_freqs_t **pxa_freqs) | 214 | struct pxa_freqs **pxa_freqs) |
215 | { | 215 | { |
216 | if (cpu_is_pxa25x()) { | 216 | if (cpu_is_pxa25x()) { |
217 | if (!pxa255_turbo_table) { | 217 | if (!pxa255_turbo_table) { |
@@ -270,7 +270,7 @@ static unsigned int pxa_cpufreq_get(unsigned int cpu) | |||
270 | static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx) | 270 | static int pxa_set_target(struct cpufreq_policy *policy, unsigned int idx) |
271 | { | 271 | { |
272 | struct cpufreq_frequency_table *pxa_freqs_table; | 272 | struct cpufreq_frequency_table *pxa_freqs_table; |
273 | pxa_freqs_t *pxa_freq_settings; | 273 | struct pxa_freqs *pxa_freq_settings; |
274 | unsigned long flags; | 274 | unsigned long flags; |
275 | unsigned int new_freq_cpu, new_freq_mem; | 275 | unsigned int new_freq_cpu, new_freq_mem; |
276 | unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; | 276 | unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; |
@@ -361,7 +361,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
361 | int i; | 361 | int i; |
362 | unsigned int freq; | 362 | unsigned int freq; |
363 | struct cpufreq_frequency_table *pxa255_freq_table; | 363 | struct cpufreq_frequency_table *pxa255_freq_table; |
364 | pxa_freqs_t *pxa255_freqs; | 364 | struct pxa_freqs *pxa255_freqs; |
365 | 365 | ||
366 | /* try to guess pxa27x cpu */ | 366 | /* try to guess pxa27x cpu */ |
367 | if (cpu_is_pxa27x()) | 367 | if (cpu_is_pxa27x()) |