diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-18 11:05:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-18 11:05:43 -0500 |
commit | 376fdd2a5d2484c90caabef483390a2cd3cda7a0 (patch) | |
tree | d0b25176f37580150ee9bd53e39873a88bda8345 /arch/blackfin/mach-common/cpufreq.c | |
parent | af94ce063ce5e496f0da0434dc925dd9a665d24f (diff) | |
parent | 62273eeb6ac516ab0abf49417378726ad8875b03 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
Blackfin arch: fix a broken define in dma-mapping
Blackfin arch: fix bug - Turn on DEBUG_DOUBLEFAULT, booting SMP kernel crash
Blackfin arch: fix bug - shared lib function in L2 failed be called
Blackfin arch: fix incorrect limit check for bf54x check_gpio
Blackfin arch: fix bug - Cpufreq assumes clocks in kHz and not Hz.
Blackfin arch: dont warn when running a kernel on the oldest supported silicon
Blackfin arch: fix bug - kernel build with write back policy fails to be booted up
Blackfin arch: fix bug - dmacopy test case fail on all platform
Blackfin arch: Fix typo when adding CONFIG_DEBUG_VERBOSE
Blackfin arch: don't copy bss when copying L1
Blackfin arch: fix bug - Fail to boot jffs2 kernel for BF561 with SMP patch
Blackfin arch: handle case of d_path() returning error in decode_address()
Diffstat (limited to 'arch/blackfin/mach-common/cpufreq.c')
-rw-r--r-- | arch/blackfin/mach-common/cpufreq.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c index c22c47b60127..dda5443b37ed 100644 --- a/arch/blackfin/mach-common/cpufreq.c +++ b/arch/blackfin/mach-common/cpufreq.c | |||
@@ -72,13 +72,13 @@ unsigned int __bfin_cycles_mod; | |||
72 | 72 | ||
73 | /**************************************************************************/ | 73 | /**************************************************************************/ |
74 | 74 | ||
75 | static unsigned int bfin_getfreq(unsigned int cpu) | 75 | static unsigned int bfin_getfreq_khz(unsigned int cpu) |
76 | { | 76 | { |
77 | /* The driver only support single cpu */ | 77 | /* The driver only support single cpu */ |
78 | if (cpu != 0) | 78 | if (cpu != 0) |
79 | return -1; | 79 | return -1; |
80 | 80 | ||
81 | return get_cclk(); | 81 | return get_cclk() / 1000; |
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
@@ -96,7 +96,7 @@ static int bfin_target(struct cpufreq_policy *policy, | |||
96 | 96 | ||
97 | cclk_hz = bfin_freq_table[index].frequency; | 97 | cclk_hz = bfin_freq_table[index].frequency; |
98 | 98 | ||
99 | freqs.old = bfin_getfreq(0); | 99 | freqs.old = bfin_getfreq_khz(0); |
100 | freqs.new = cclk_hz; | 100 | freqs.new = cclk_hz; |
101 | freqs.cpu = 0; | 101 | freqs.cpu = 0; |
102 | 102 | ||
@@ -137,8 +137,8 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy) | |||
137 | if (policy->cpu != 0) | 137 | if (policy->cpu != 0) |
138 | return -EINVAL; | 138 | return -EINVAL; |
139 | 139 | ||
140 | cclk = get_cclk(); | 140 | cclk = get_cclk() / 1000; |
141 | sclk = get_sclk(); | 141 | sclk = get_sclk() / 1000; |
142 | 142 | ||
143 | #if ANOMALY_05000273 || (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE)) | 143 | #if ANOMALY_05000273 || (!defined(CONFIG_BF54x) && defined(CONFIG_BFIN_DCACHE)) |
144 | min_cclk = sclk * 2; | 144 | min_cclk = sclk * 2; |
@@ -152,7 +152,7 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy) | |||
152 | dpm_state_table[index].csel = csel << 4; /* Shift now into PLL_DIV bitpos */ | 152 | dpm_state_table[index].csel = csel << 4; /* Shift now into PLL_DIV bitpos */ |
153 | dpm_state_table[index].tscale = (TIME_SCALE / (1 << csel)) - 1; | 153 | dpm_state_table[index].tscale = (TIME_SCALE / (1 << csel)) - 1; |
154 | 154 | ||
155 | pr_debug("cpufreq: freq:%d csel:%d tscale:%d\n", | 155 | pr_debug("cpufreq: freq:%d csel:0x%x tscale:%d\n", |
156 | bfin_freq_table[index].frequency, | 156 | bfin_freq_table[index].frequency, |
157 | dpm_state_table[index].csel, | 157 | dpm_state_table[index].csel, |
158 | dpm_state_table[index].tscale); | 158 | dpm_state_table[index].tscale); |
@@ -173,7 +173,7 @@ static struct freq_attr *bfin_freq_attr[] = { | |||
173 | static struct cpufreq_driver bfin_driver = { | 173 | static struct cpufreq_driver bfin_driver = { |
174 | .verify = bfin_verify_speed, | 174 | .verify = bfin_verify_speed, |
175 | .target = bfin_target, | 175 | .target = bfin_target, |
176 | .get = bfin_getfreq, | 176 | .get = bfin_getfreq_khz, |
177 | .init = __bfin_cpu_init, | 177 | .init = __bfin_cpu_init, |
178 | .name = "bfin cpufreq", | 178 | .name = "bfin cpufreq", |
179 | .owner = THIS_MODULE, | 179 | .owner = THIS_MODULE, |