mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 08:49:45 +00:00
cpufreq: dbx500: use cpufreq_generic_init()
Use generic cpufreq_generic_init() routine instead of replicating the same code here. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
af8c4cfabe
commit
2b3dc761cf
1 changed files with 1 additions and 20 deletions
|
@ -74,26 +74,7 @@ static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu)
|
||||||
|
|
||||||
static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
|
static int dbx500_cpufreq_init(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
int res;
|
return cpufreq_generic_init(policy, freq_table, 20 * 1000);
|
||||||
|
|
||||||
/* get policy fields based on the table */
|
|
||||||
res = cpufreq_table_validate_and_show(policy, freq_table);
|
|
||||||
if (res) {
|
|
||||||
pr_err("dbx500-cpufreq: Failed to read policy table\n");
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* FIXME : Need to take time measurement across the target()
|
|
||||||
* function with no/some/all drivers in the notification
|
|
||||||
* list.
|
|
||||||
*/
|
|
||||||
policy->cpuinfo.transition_latency = 20 * 1000; /* in ns */
|
|
||||||
|
|
||||||
/* policy sharing between dual CPUs */
|
|
||||||
cpumask_setall(policy->cpus);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct cpufreq_driver dbx500_cpufreq_driver = {
|
static struct cpufreq_driver dbx500_cpufreq_driver = {
|
||||||
|
|
Loading…
Reference in a new issue