aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537
diff options
context:
space:
mode:
authorMike Frysinger <michael.frysinger@analog.com>2007-05-21 06:09:12 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-21 12:50:21 -0400
commit6dae211411448dd9a12895b802bdedca8296f23d (patch)
tree92b98234289bba01a233d721e1a54e63e35fb7d9 /arch/blackfin/mach-bf537
parente3defffe915961cf9c6e1f16486ae83fb7212f29 (diff)
Blackfin arch: fix a few random warnings
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r--arch/blackfin/mach-bf537/cpu.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/blackfin/mach-bf537/cpu.c b/arch/blackfin/mach-bf537/cpu.c
index 2d83b7e35469..0442c4c7f723 100644
--- a/arch/blackfin/mach-bf537/cpu.c
+++ b/arch/blackfin/mach-bf537/cpu.c
@@ -43,13 +43,13 @@
43#define VCO1 (CONFIG_CLKIN_HZ*9) /*99532800 */ 43#define VCO1 (CONFIG_CLKIN_HZ*9) /*99532800 */
44#define VCO(x) VCO##x 44#define VCO(x) VCO##x
45 45
46#define FREQ(x) {VCO(x),VCO(x)/4},{VCO(x),VCO(x)/2},{VCO(x),VCO(x)} 46#define MFREQ(x) {VCO(x),VCO(x)/4},{VCO(x),VCO(x)/2},{VCO(x),VCO(x)}
47/* frequency */ 47/* frequency */
48static struct cpufreq_frequency_table bf537_freq_table[] = { 48static struct cpufreq_frequency_table bf537_freq_table[] = {
49 FREQ(1), 49 MFREQ(1),
50 FREQ(3), 50 MFREQ(3),
51 {VCO4, VCO4 / 2}, {VCO4, VCO4}, 51 {VCO4, VCO4 / 2}, {VCO4, VCO4},
52 FREQ(5), 52 MFREQ(5),
53 {0, CPUFREQ_TABLE_END}, 53 {0, CPUFREQ_TABLE_END},
54}; 54};
55 55
@@ -59,13 +59,14 @@ static struct cpufreq_frequency_table bf537_freq_table[] = {
59 */ 59 */
60static int bf537_getfreq(unsigned int cpu) 60static int bf537_getfreq(unsigned int cpu)
61{ 61{
62 unsigned long cclk_mhz, vco_mhz; 62 unsigned long cclk_mhz;
63 63
64 /* The driver only support single cpu */ 64 /* The driver only support single cpu */
65 if (cpu == 0) 65 if (cpu == 0)
66 dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz); 66 dpmc_fops.ioctl(NULL, NULL, IOCTL_GET_CORECLOCK, &cclk_mhz);
67 else 67 else
68 cclk_mhz = -1; 68 cclk_mhz = -1;
69
69 return cclk_mhz; 70 return cclk_mhz;
70} 71}
71 72
@@ -75,13 +76,12 @@ static int bf537_target(struct cpufreq_policy *policy,
75 unsigned long cclk_mhz; 76 unsigned long cclk_mhz;
76 unsigned long vco_mhz; 77 unsigned long vco_mhz;
77 unsigned long flags; 78 unsigned long flags;
78 unsigned int index, vco_index; 79 unsigned int index;
79 int i;
80
81 struct cpufreq_freqs freqs; 80 struct cpufreq_freqs freqs;
82 if (cpufreq_frequency_table_target 81
83 (policy, bf537_freq_table, target_freq, relation, &index)) 82 if (cpufreq_frequency_table_target(policy, bf537_freq_table, target_freq, relation, &index))
84 return -EINVAL; 83 return -EINVAL;
84
85 cclk_mhz = bf537_freq_table[index].frequency; 85 cclk_mhz = bf537_freq_table[index].frequency;
86 vco_mhz = bf537_freq_table[index].index; 86 vco_mhz = bf537_freq_table[index].index;
87 87
@@ -114,8 +114,6 @@ static int bf537_verify_speed(struct cpufreq_policy *policy)
114 114
115static int __init __bf537_cpu_init(struct cpufreq_policy *policy) 115static int __init __bf537_cpu_init(struct cpufreq_policy *policy)
116{ 116{
117 int result;
118
119 if (policy->cpu != 0) 117 if (policy->cpu != 0)
120 return -EINVAL; 118 return -EINVAL;
121 119