aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-03-01Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-cpufreqRafael J. Wysocki2-3/+21
Pull cpufreq driver fixes for v5.1 from Viresh Kumar: "This pull request contains minor fixes for ap806 and kryo cpufreq drivers (Julia Lawall and Viresh Kumar)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: kryo: Release OPP tables on module removal cpufreq: ap806: add missing of_node_put after of_device_is_available
2019-02-28cpufreq: kryo: Release OPP tables on module removalViresh Kumar1-2/+18
Commit 5ad7346b4ae2 ("cpufreq: kryo: Add module remove and exit") made it possible to build the kryo cpufreq driver as a module, but it failed to release all the resources, i.e. OPP tables, when the module is unloaded. This patch fixes it by releasing the OPP tables, by calling dev_pm_opp_put_supported_hw() for them, from the qcom_cpufreq_kryo_remove() routine. The array of pointers to the OPP tables is also allocated dynamically now in qcom_cpufreq_kryo_probe(), as the pointers will be required while releasing the resources. Compile tested only. Cc: 4.18+ <stable@vger.kernel.org> # v4.18+ Fixes: 5ad7346b4ae2 ("cpufreq: kryo: Add module remove and exit") Reviewed-by: Georgi Djakov <georgi.djakov@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-25cpufreq: ap806: add missing of_node_put after of_device_is_availableJulia Lawall1-1/+3
Add an of_node_put when a tested device node is not available. The semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ identifier f; local idexpression e; expression x; @@ e = f(...); ... when != of_node_put(e) when != x = e when != e = x when any if (<+...of_device_is_available(e)...+>) { ... when != of_node_put(e) ( return e; | + of_node_put(e); return ...; ) } // </smpl> Fixes: f525a670533d9 ("cpufreq: ap806: add cpufreq driver for Armada 8K") Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-24Merge back earlier cpufreq material for v5.1.Rafael J. Wysocki25-240/+571
2019-02-20cpufreq: acpi-cpufreq: Report if CPU doesn't support boost technologiesErwan Velu1-1/+3
There is some rare cases where CPB (and possibly IDA) are missing on processors. This is the case fixed by commit f7f3dc00f612 ("x86/cpu/AMD: Fix erratum 1076 (CPB bit)") and following. In such context, the boost status isn't reported by /sys/devices/system/cpu/cpufreq/boost. This commit is about printing a message to report that the CPU doesn't expose the boost capabilities. This message could help debugging platforms hit by this phenomena. Signed-off-by: Erwan Velu <e.velu@criteo.com> [ rjw: Change the message text somewhat ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-20cpufreq: Pass updated policy to driver ->setpolicy() callbackRafael J. Wysocki1-1/+1
The invocation of the ->setpolicy() cpufreq driver callback should be equivalent to calling cpufreq_governor_limits(policy) for drivers with internal governors, but in fact it isn't so, because the temporary new_policy object is passed to it instead of the updated policy. That is a bit confusing, so make cpufreq_set_policy() pass the updated policy to the driver ->setpolicy() callback. No intentional changes of behavior. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-20cpufreq: Fix two debug messages in cpufreq_set_policy()Rafael J. Wysocki1-2/+2
Remove the redundant "cpufreq:" prefix from two debug messages in cpufreq_set_policy(). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-20cpufreq: Reorder and simplify cpufreq_update_policy()Rafael J. Wysocki1-12/+7
In cpufreq_update_policy(), instead of updating new_policy.cur separately, which is kind of confusing, because cpufreq_set_policy() doesn't take that value into account directly anyway, make the copy of the existing policy after calling cpufreq_update_current_freq(). No intentional changes of behavior. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-20cpufreq: Add kerneldoc comments for two core functionsRafael J. Wysocki1-8/+24
Add kerneldoc comments describing cpufreq_set_policy() and cpufreq_update_policy() as they have not been properly documented so far and they really need to be documented. While at it, fix white space around the cpufreq_set_policy() header. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-19cpufreq: scmi: Fix use-after-free in scmi_cpufreq_exit()Yangtao Li1-1/+1
This issue was detected with the help of Coccinelle. So change the order of function calls to fix it. Fixes: 1690d8bb91e37 (cpufreq: scpi/scmi: Fix freeing of dynamic OPPs) Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Cc: 4.20+ <stable@vger.kernel.org> # 4.20+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-19Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-cpufreqRafael J. Wysocki5-11/+11
Pull cpufreq drivers material for v5.1 from Viresh Kumar: "This contains: - Minor cleanups for pcc, longhaul, powerenv and speedstep drivers (Yangtao Li). - Moving configuration data out of mach directory for davinci (Bartosz Golaszewski)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: davinci: move configuration to include/linux/platform_data cpufreq: speedstep: convert BUG() to BUG_ON() cpufreq: powernv: fix missing check of return value in init_powernv_pstates() cpufreq: longhaul: remove unneeded semicolon cpufreq: pcc-cpufreq: remove unneeded semicolon
2019-02-18cpufreq: intel_pstate: Rework iowait boosting to be less aggressiveRafael J. Wysocki1-18/+18
The current iowait boosting mechanism in intel_pstate_update_util() is quite aggressive, as it goes to the maximum P-state right away, and may cause excessive amounts of energy to be used, which is not desirable and arguably isn't necessary too. Follow commit a5a0809bc58e ("cpufreq: schedutil: Make iowait boost more energy efficient") that reworked the analogous iowait boost mechanism in the schedutil governor and make the iowait boosting in intel_pstate_update_util() work along the same lines. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-18cpufreq: intel_pstate: Eliminate intel_pstate_get_base_pstate()Rafael J. Wysocki1-7/+2
There is only one caller of intel_pstate_get_base_pstate() and it is more straightforward to carry out the computation directly in the caller, so do that and drop intel_pstate_get_base_pstate(). No intentional changes of behavior. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-18cpufreq: intel_pstate: Avoid redundant initialization of local varsRafael J. Wysocki1-7/+3
After commit 1a4fe38add8b ("cpufreq: intel_pstate: Remove max/min fractions to limit performance") the initial value of the pstate local variable in intel_pstate_max_within_limits() and the initial value of the max_pstate local variable in intel_pstate_prepare_request() are both immediately discarded, so initialize both these variables to their target values upfront. No intentional changes of behavior. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-18cpufreq / cppc: Work around for Hisilicon CPPC cpufreqXiongfeng Wang1-0/+65
Hisilicon chips do not support delivered performance counter register and reference performance counter register. But the platform can calculate the real performance using its own method. We reuse the desired performance register to store the real performance calculated by the platform. After the platform finished the frequency adjust, it gets the real performance and writes it into desired performance register. Os can use it to calculate the real frequency. Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com> [ rjw: Drop unnecessary braces ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-18cpufreq: davinci: move configuration to include/linux/platform_dataBartosz Golaszewski1-4/+1
The header containing the configuration structure for davinci cpufreq driver lives in mach-davinci/include/mach/. This is fine for now but if we want to make davinci part of the multi_v5 build, no code external to mach-davinci should include machine-specific headers. Move the configuration structure to include/linux/platform_data. While we're at it: convert the GPL-2.0 boilerplate to a proper SPDX license identifier. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-18cpufreq: speedstep: convert BUG() to BUG_ON()Yangtao Li1-2/+1
To fix coccinelle WARNING. WARNING: Use BUG_ON instead of if condition followed by BUG. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-18cpufreq: powernv: fix missing check of return value in init_powernv_pstates()Yangtao Li1-3/+7
kmalloc() could fail, so insert a check of its return value. And if it fails, returns -ENOMEM. And remove (struct pstate_idx_revmap_data *) to fix coccinelle WARNING by the way. WARNING: casting value returned by memory allocation function to (struct pstate_idx_revmap_data *) is useless. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-18cpufreq: longhaul: remove unneeded semicolonYangtao Li1-1/+1
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-18cpufreq: pcc-cpufreq: remove unneeded semicolonYangtao Li1-1/+1
The semicolon is unneeded, so remove it. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-15Merge tag 'tegra-for-5.1-cpufreq' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/driversArnd Bergmann3-42/+7
cpufreq: tegra: Add support for Tegra210 This uses the DFLL clock support to enable CPU frequency scaling on Tegra210. * tag 'tegra-for-5.1-cpufreq' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: cpufreq: dt-platdev: add Tegra210 to blacklist cpufreq: tegra124: extend to support Tegra210 cpufreq: tegra124: do not handle the CPU rail Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2019-02-14cpufreq: Replace double NOT (!!) with single NOT (!)Viresh Kumar1-1/+1
Double NOT (!!) operation is normally done to convert a non-zero value to 1 and keep zero as is, but that isn't the requirement in this case. All we wanted was to make sure that only one of the two routines isn't set, i.e. either both function pointers are set or both are unset. This can be done with a single NOT (!) operation as well. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-13cpufreq: intel_pstate: Add reasons for failure and debug messagesErwan Velu1-6/+21
The init code path has several exceptions where the driver can decide not to load. As CONFIG_X86_INTEL_PSTATE is generally set to Y, the return code is not reachable. The initialization code is neither verbose of the reason why it did choose to prematurely exit, so it is difficult for a user to determine, on a given platform, why the driver didn't load properly. This patch is about reporting to the user the reason/context of why the driver failed to load. That is a precious hint when debugging a platform. Signed-off-by: Erwan Velu <e.velu@criteo.com> [ rjw: Subject & changelog, minor fixups ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-13Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-cpufreqRafael J. Wysocki7-30/+307
Pull ARM cpufreq driver updates for v5.1 from Viresh Kumar: "This pull request contains following changes: - New Armada 8k cpufreq driver (Gregory CLEMENT). - qcom driver cleanups (Amit Kucheria, Taniya Das, Yangtao Li). - s5pv210 driver cleanup (Paweł Chmiel). - tegra driver cleanup (Yangtao Li). - Minor update to MAINTAINERS file (Baruch Siach)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: qcom-hw: Register an Energy Model cpufreq: qcom: Read voltage LUT and populate OPP cpufreq: qcom-hw: Move to device_initcall cpufreq: tegra124: add missing of_node_put() cpufreq: qcom-kryo: make some variables static MAINTAINERS: Update the active pm tree for ARM cpufreq: ap806: add cpufreq driver for Armada 8K MAINTAINERS: add new entries for Armada 8K cpufreq driver cpufreq: s5pv210: Defer probe if getting regulators fail MAINTAINERS: use common indentation PM / OPP: Introduce a power estimation helper PM / OPP: Remove unused parameter of _generic_set_opp_clk_only()
2019-02-12cpufreq: dt: Implement online/offline() callbacksViresh Kumar1-0/+17
Implement the light-weight tear down and bring up helpers to reduce the amount of work to do on CPU offline/online operation. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-12cpufreq: Allow light-weight tear down and bring up of CPUsViresh Kumar1-20/+38
The cpufreq core doesn't remove the cpufreq policy anymore on CPU offline operation, rather that happens when the CPU device gets unregistered from the kernel. This allows faster recovery when the CPU comes back online. This is also very useful during system wide suspend/resume where we offline all non-boot CPUs during suspend and then bring them back on resume. This commit takes the same idea a step ahead to allow drivers to do light weight tear-down and bring-up during CPU offline and online operations. A new set of callbacks is introduced, online/offline(). online() gets called when the first CPU of an inactive policy is brought up and offline() gets called when all the CPUs of a policy are offlined. The existing init/exit() callback get called on policy creation/destruction. They also get called instead of online/offline() callbacks if the online/offline() callbacks aren't provided. This also moves around some code to get executed only for the new-policy case going forward. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-12Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-oppRafael J. Wysocki7-4/+49
Pull operating performance points (OPP) framework updates for v5.1 from Viresh Kumar: "This pull request contains following changes: - Introduced new OPP helper for power-estimation and used it in several cpufreq drivers (Quentin Perret, Matthias Kaehlcke, Dietmar Eggemann, and Yangtao Li). - OPP Debugfs cleanup (Greg KH). - OPP core cleanup (Viresh Kumar)." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: OMAP: Register an Energy Model cpufreq: imx6q: Register an Energy Model opp: no need to check return value of debugfs_create functions cpufreq: mediatek: Register an Energy Model cpufreq: scmi: Register an Energy Model cpufreq: arm_big_little: Register an Energy Model cpufreq: scpi: Register an Energy Model cpufreq: dt: Register an Energy Model PM / OPP: Introduce a power estimation helper PM / OPP: Remove unused parameter of _generic_set_opp_clk_only()
2019-02-08Merge branch 'cpufreq/qcom-hw' into cpufreq/arm/linux-nextViresh Kumar4-24/+50
2019-02-08cpufreq: qcom-hw: Register an Energy ModelMatthias Kaehlcke1-0/+2
Try and register an Energy Model from qcom-cpufreq-hw to allow interested sub-systems like the task scheduler to use the provided information. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> [ Viresh: Rebased over cpufreq related changes ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-08cpufreq: qcom: Read voltage LUT and populate OPPTaniya Das1-9/+37
Add support to read the voltage look up table and populate OPP for all corresponding CPUS for consumers like the energy model could use the frequency and voltage from the OPP tables. Also update the logic to not add duplicate OPPs. Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Taniya Das <tdas@codeaurora.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-08cpufreq: qcom-hw: Move to device_initcallAmit Kucheria1-1/+1
subsys_initcall causes problems registering the driver as a thermal cooling device. If "faster boot" is the main reason for doing subsys_initcall, this should be handled in the bootloader or another boot constraint framework. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: OMAP: Register an Energy ModelYangtao Li1-1/+3
Try and register an Energy Model from omap-cpufreq.c to allow interested subsystems like the task scheduler to use the provided information. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: imx6q: Register an Energy ModelYangtao Li1-0/+1
Try and register an Energy Model from imx6q-cpufreq to allow interested subsystems like the task scheduler to use the provided information. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: ap806: add cpufreq driver for Armada 8KGregory CLEMENT3-0/+216
Add cpufreq driver for Marvell AP-806 found on Aramda 8K. The AP-806 has DFS (Dynamic Frequency Scaling) with coupled clock domain for two clusters, so this driver will directly use generic cpufreq-dt driver as backend. Based on the work of Omri Itach <omrii@marvell.com>. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: tegra124: add missing of_node_put()Yangtao Li1-0/+2
of_cpu_device_node_get() will increase the refcount of device_node, it is necessary to call of_node_put() at the end to release the refcount. Fixes: 9eb15dbbfa1a2 ("cpufreq: Add cpufreq driver for Tegra124") Cc: <stable@vger.kernel.org> # 4.4+ Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: qcom-kryo: make some variables staticYangtao Li1-1/+1
The variables are local to the source and do not need to be in global scope, so make them static. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: s5pv210: Defer probe if getting regulators failPaweł Chmiel1-19/+48
There is possibility, that when probing driver, regulators are not yet initialized. In this case we should return EPROBE_DEFER and wait till they're initialized, since they're required currently for cpufreq driver to work. Also move regulator initialization code at beginning of probe, so we can defer as fast as posibble. Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: mediatek: Register an Energy ModelMatthias Kaehlcke1-0/+2
Try and register an Energy Model from mediatek-cpufreq to allow interested subsystems like the task scheduler to use the provided information. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: scmi: Register an Energy ModelQuentin Perret1-3/+36
The Energy Model (EM) framework provides an API to register the active power of CPUs. Call this API from the scmi-cpufreq driver by using the power costs obtained from firmware. This is done to ensure interested subsystems (the task scheduler, for example) can make use of the EM when available. Signed-off-by: Quentin Perret <quentin.perret@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: arm_big_little: Register an Energy ModelDietmar Eggemann1-0/+2
Now that PM_OPP provides a helper function to estimate the power consumed by CPUs, make sure to try and register an Energy Model (EM) from the arm_big_little CPUFreq driver, hence ensuring interested subsystems (the task scheduler, for example) can make use of that information when available. Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Signed-off-by: Quentin Perret <quentin.perret@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: scpi: Register an Energy ModelQuentin Perret1-0/+3
Now that PM_OPP provides a helper function to estimate the power consumed by CPUs, make sure to try and register an Energy Model (EM) from scpi-cpufreq, hence ensuring interested subsystems (the task scheduler, for example) can make use of that information when available. Signed-off-by: Quentin Perret <quentin.perret@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-07cpufreq: dt: Register an Energy ModelQuentin Perret1-0/+2
Now that PM_OPP provides a helper function to estimate the power consumed by CPUs, make sure to try and register an Energy Model (EM) from cpufreq-dt, hence ensuring interested subsystems (the task scheduler, for example) can make use of that information when available. Signed-off-by: Quentin Perret <quentin.perret@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2019-02-06cpufreq: dt-platdev: add Tegra210 to blacklistJoseph Lo1-0/+1
Tegra210 uses "tegra124-cpufreq" platform driver to register device data for "cpufreq-dt" driver. So add it in the blacklist for "cpufreq-dt-platdev" driver to drop that. Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: linux-pm@vger.kernel.org Signed-off-by: Joseph Lo <josephl@nvidia.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-02-06cpufreq: tegra124: extend to support Tegra210Joseph Lo1-1/+2
Tegra210 uses the same methodology as Tegra124 for CPUFreq controlling that based on DFLL clock. So extending this driver to support Tegra210. Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: linux-pm@vger.kernel.org Signed-off-by: Joseph Lo <josephl@nvidia.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-02-06cpufreq: tegra124: do not handle the CPU railJoseph Lo2-41/+4
The Tegra124 cpufreq driver has no information to handle the Vdd-CPU rail. So this driver shouldn't handle for the CPU clock switching from DFLL to other PLL clocks. It was designed to work on DFLL clock only, which handle the frequency/voltage scaling in the background. This patch removes the driver dependency of the CPU rail, as well as not allow it to be built as a module and remove the removal function. So it can keep working on DFLL clock. Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: linux-pm@vger.kernel.org Signed-off-by: Joseph Lo <josephl@nvidia.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-02-01cpufreq: stats: Fix concurrency issues while resetting statsViresh Kumar1-2/+7
It is possible for cpufreq_stats_clear_table() and cpufreq_stats_record_transition() to get called concurrently and they will try to update same variables simultaneously and may lead to corruption of data. Prevent that with the help of existing spinlock. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-01cpufreq: stats: Declare freq-attr right after their callbacksViresh Kumar1-4/+3
Freq attribute for "trans_table" is defined right after its callback (without any blank line between them), but the others are defined separately later on. Keep this consistent and define all attributes right after their callbacks. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-01-30cpufreq: scpi: Use auto-registration of thermal cooling deviceAmit Kucheria1-12/+2
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-01-30cpufreq: scmi: Use auto-registration of thermal cooling deviceAmit Kucheria1-12/+2
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-01-30cpufreq: qoriq: Use auto-registration of thermal cooling deviceAmit Kucheria1-13/+2
Use the CPUFREQ_IS_COOLING_DEV flag to allow cpufreq core to automatically register as a thermal cooling device. This allows removal of boiler plate code from the driver. Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>