Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Blackfin: cpufreq: use a constant latency

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>

authored by

Michael Hennerich and committed by
Mike Frysinger
d887a1ce 21b03cfe

+2 -1
+2 -1
arch/blackfin/mach-common/cpufreq.c
··· 138 138 dpm_state_table[index].tscale); 139 139 } 140 140 141 - policy->cpuinfo.transition_latency = (bfin_read_PLL_LOCKCNT() / (sclk / 1000000)) * 1000; 141 + policy->cpuinfo.transition_latency = 50000; /* 50us assumed */ 142 + 142 143 /*Now ,only support one cpu */ 143 144 policy->cur = cclk; 144 145 cpufreq_frequency_table_get_attr(bfin_freq_table, policy->cpu);