Lines Matching +full:pre +full:- +full:scaling
1 // SPDX-License-Identifier: GPL-2.0-only
3 * CPU frequency scaling for DaVinci
5 * Copyright (C) 2009 Texas Instruments Incorporated - https://www.ti.com/
7 * Based on linux/arch/arm/plat-omap/cpu-omap.c. Original Copyright follows:
12 * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
14 * Copyright (C) 2007-2008 Texas Instruments, Inc.
23 #include <linux/platform_data/davinci-cpufreq.h>
37 struct davinci_cpufreq_config *pdata = cpufreq.dev->platform_data; in davinci_target()
42 old_freq = policy->cur; in davinci_target()
43 new_freq = pdata->freq_table[idx].frequency; in davinci_target()
46 if (pdata->set_voltage && new_freq > old_freq) { in davinci_target()
47 ret = pdata->set_voltage(idx); in davinci_target()
63 if (pdata->set_voltage && new_freq < old_freq) in davinci_target()
64 pdata->set_voltage(idx); in davinci_target()
72 struct davinci_cpufreq_config *pdata = cpufreq.dev->platform_data; in davinci_cpu_init()
73 struct cpufreq_frequency_table *freq_table = pdata->freq_table; in davinci_cpu_init()
75 if (policy->cpu != 0) in davinci_cpu_init()
76 return -EINVAL; in davinci_cpu_init()
79 if (pdata->init) { in davinci_cpu_init()
80 result = pdata->init(); in davinci_cpu_init()
85 policy->clk = cpufreq.armclk; in davinci_cpu_init()
88 * Time measurement across the target() function yields ~1500-1800us in davinci_cpu_init()
91 * to pre/post change notification list. in davinci_cpu_init()
109 struct davinci_cpufreq_config *pdata = pdev->dev.platform_data; in davinci_cpufreq_probe()
113 return -EINVAL; in davinci_cpufreq_probe()
114 if (!pdata->freq_table) in davinci_cpufreq_probe()
115 return -EINVAL; in davinci_cpufreq_probe()
117 cpufreq.dev = &pdev->dev; in davinci_cpufreq_probe()
146 .name = "cpufreq-davinci",