Skip to content

Commit

Permalink
Blackfin: cpufreq: use a constant latency
Browse files Browse the repository at this point in the history
PLL_LOCKCNT applies only to the PLL programming sequence which does not
apply to core and system clock dividers.  Writes to PLL_DIV to change the
CSEL/SSEL dividers take effect immediately.

There is still overhead in software in writing the new dividers, so just
use a value of 50us as this should be good enough.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Michael Hennerich authored and Mike Frysinger committed Dec 15, 2009
1 parent 21b03cf commit d887a1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/blackfin/mach-common/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ static int __init __bfin_cpu_init(struct cpufreq_policy *policy)
dpm_state_table[index].tscale);
}

policy->cpuinfo.transition_latency = (bfin_read_PLL_LOCKCNT() / (sclk / 1000000)) * 1000;
policy->cpuinfo.transition_latency = 50000; /* 50us assumed */

/*Now ,only support one cpu */
policy->cur = cclk;
cpufreq_frequency_table_get_attr(bfin_freq_table, policy->cpu);
Expand Down

0 comments on commit d887a1c

Please sign in to comment.