Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188532
b: refs/heads/master
c: 7998a87
h: refs/heads/master
v: v3
  • Loading branch information
Graf Yang authored and Mike Frysinger committed Mar 9, 2010
1 parent 6b648ac commit d1a8a51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2b0cd61cf635cbdc110472f6edc97328322cb8b
refs/heads/master: 7998a8787a8b35fede689c2bb716f65b231e7492
13 changes: 12 additions & 1 deletion trunk/arch/blackfin/mach-common/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/fs.h>
#include <linux/delay.h>
#include <asm/blackfin.h>
#include <asm/time.h>
#include <asm/dpmc.h>
Expand Down Expand Up @@ -99,13 +100,15 @@ static unsigned int bfin_getfreq_khz(unsigned int cpu)
return get_cclk() / 1000;
}


static int bfin_target(struct cpufreq_policy *poli,
unsigned int target_freq, unsigned int relation)
{
unsigned int index, plldiv, cpu;
unsigned long flags, cclk_hz;
struct cpufreq_freqs freqs;
static unsigned long lpj_ref;
static unsigned int lpj_ref_freq;

#if defined(CONFIG_CYCLES_CLOCKSOURCE)
cycles_t cycles;
#endif
Expand Down Expand Up @@ -144,6 +147,14 @@ static int bfin_target(struct cpufreq_policy *poli,
(cycles << __bfin_cycles_mod) - (cycles << index);
__bfin_cycles_mod = index;
#endif
if (!lpj_ref_freq) {
lpj_ref = loops_per_jiffy;
lpj_ref_freq = freqs.old;
}
if (freqs.new != freqs.old) {
loops_per_jiffy = cpufreq_scale(lpj_ref,
lpj_ref_freq, freqs.new);
}
local_irq_restore_hw(flags);
}
/* TODO: just test case for cycles clock source, remove later */
Expand Down

0 comments on commit d1a8a51

Please sign in to comment.