mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 05:41:55 +00:00
ARM cpufreq updates for 6.6
- Migrate various platforms to use remove callback returning void (Yangtao Li). - Add online/offline/exit hooks for Tegra driver (Sumit Gupta). - Explicitly include correct DT includes (Rob Herring). - Frequency domain updates for qcom-hw driver (Neil Armstrong). - Modify AMD pstate driver return the highest_perf value (Meng Li). - Generic cleanups for cppc, mediatek and powernow driver (Liao Chang and Konrad Dybcio). - Add more platforms to cpufreq-arm driver's blocklist (AngeloGioacchino Del Regno and Konrad Dybcio). - brcmstb-avs-cpufreq: Fix -Warray-bounds bug (Gustavo A. R. Silva). -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEx73Crsp7f6M6scA70rkcPK6BEhwFAmTsdAMACgkQ0rkcPK6B Ehw97RAAveiaWFM9cxEb8rvXKCWkrnBf6ijI7fG+3DJalUiJ0dCDJfxygFSnhypb cU50NEhUj57OIzGVQZHVJI0usaQwfhohEsJ+KCdj6CcjsKKrbLY7mgTu/NMfZb/+ 5bHF4o2WB8zp0PezpRKaRSb3/gRoshMSaE91uceHRYdIhBScSqcOq4CjxFQv+Nxv yv9e6lKwLZsfU42k1Ja+ZGjyWLaFA6ZwBEp6NulcIF3AK/ki1dpthGtwkd8XE//S yxCBPRgbCcW+0X/sjJ5CfMs1zw+3Syh35nXDfh3C4aykPT9nxEnsC+tx3Dgne7E/ c849zgOMNs3NNhOQzR8xb+rxSNpcV9uXrVbgLgQkc2EIzng4ha8gm6Nq8V8f792f qldMgmX7YIz+5PuH1ClCRmRvnCbfA0gp7SO/gTCXE3I3IBKl8MUsq2khCwayy4wM 0JkqVE3DUF729JO5eF1cZh/jRrb+cvkW2IlWUYo6YBHPdcru3X8ceRGQCUoDU208 02OrKI/1nwk9ZrC7mQXOsg+/gZIEZszzV4iU+6Kc9MQT8h1ZyBGp6MA89LdzqH2e FJaPtbk1lEsPUaT9i6Tk+uUZO3D7n8hj83J+8PV9wptqqxe+7ZL5Z3gxw03L1sJE SvajjgUBH13twe0cFt9Ho6XFB9rJ2Bg+jYPOrlkeHwpHtyTeDpY= =o0wB -----END PGP SIGNATURE----- Merge tag 'cpufreq-arm-updates-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq updates for 6.6 from Viresh Kumar: "- Migrate various platforms to use remove callback returning void (Yangtao Li). - Add online/offline/exit hooks for Tegra driver (Sumit Gupta). - Explicitly include correct DT includes (Rob Herring). - Frequency domain updates for qcom-hw driver (Neil Armstrong). - Modify AMD pstate driver return the highest_perf value (Meng Li). - Generic cleanups for cppc, mediatek and powernow driver (Liao Chang and Konrad Dybcio). - Add more platforms to cpufreq-arm driver's blocklist (AngeloGioacchino Del Regno and Konrad Dybcio). - brcmstb-avs-cpufreq: Fix -Warray-bounds bug (Gustavo A. R. Silva)." * tag 'cpufreq-arm-updates-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: (33 commits) cpufreq: tegra194: remove opp table in exit hook cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit() cpufreq: tegra194: add online/offline hooks cpufreq: qcom-cpufreq-hw: add support for 4 freq domains dt-bindings: cpufreq: qcom-hw: add a 4th frequency domain cpufreq: cppc: Set fie_disabled to FIE_DISABLED if fails to create kworker_fie cpufreq: cppc: cppc_cpufreq_get_rate() returns zero in all error cases. cpufreq: Prefer to print cpuid in MIN/MAX QoS register error message cpufreq: amd-pstate-ut: Modify the function to get the highest_perf value cpufreq: mediatek-hw: Remove unused define cpufreq: blocklist more Qualcomm platforms in cpufreq-dt-platdev cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug cpufreq: blocklist MSM8998 in cpufreq-dt-platdev cpufreq: omap: Convert to platform remove callback returning void cpufreq: qoriq: Convert to platform remove callback returning void cpufreq: acpi: Convert to platform remove callback returning void cpufreq: tegra186: Convert to platform remove callback returning void cpufreq: qcom-nvmem: Convert to platform remove callback returning void cpufreq: kirkwood: Convert to platform remove callback returning void cpufreq: pcc-cpufreq: Convert to platform remove callback returning void ...
This commit is contained in:
commit
6e2f78c8b0
@ -49,6 +49,7 @@ properties:
|
||||
- description: Frequency domain 0 register region
|
||||
- description: Frequency domain 1 register region
|
||||
- description: Frequency domain 2 register region
|
||||
- description: Frequency domain 3 register region
|
||||
|
||||
reg-names:
|
||||
minItems: 1
|
||||
@ -56,6 +57,7 @@ properties:
|
||||
- const: freq-domain0
|
||||
- const: freq-domain1
|
||||
- const: freq-domain2
|
||||
- const: freq-domain3
|
||||
|
||||
clocks:
|
||||
items:
|
||||
@ -69,7 +71,7 @@ properties:
|
||||
|
||||
interrupts:
|
||||
minItems: 1
|
||||
maxItems: 3
|
||||
maxItems: 4
|
||||
|
||||
interrupt-names:
|
||||
minItems: 1
|
||||
@ -77,6 +79,7 @@ properties:
|
||||
- const: dcvsh-irq-0
|
||||
- const: dcvsh-irq-1
|
||||
- const: dcvsh-irq-2
|
||||
- const: dcvsh-irq-3
|
||||
|
||||
'#freq-domain-cells':
|
||||
const: 1
|
||||
|
@ -1011,22 +1011,20 @@ static int __init acpi_cpufreq_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int acpi_cpufreq_remove(struct platform_device *pdev)
|
||||
static void acpi_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
pr_debug("%s\n", __func__);
|
||||
|
||||
cpufreq_unregister_driver(&acpi_cpufreq_driver);
|
||||
|
||||
free_acpi_perf_data();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver acpi_cpufreq_platdrv = {
|
||||
.driver = {
|
||||
.name = "acpi-cpufreq",
|
||||
},
|
||||
.remove = acpi_cpufreq_remove,
|
||||
.remove_new = acpi_cpufreq_remove,
|
||||
};
|
||||
|
||||
static int __init acpi_cpufreq_init(void)
|
||||
|
@ -127,8 +127,6 @@ static void amd_pstate_ut_check_perf(u32 index)
|
||||
struct cpufreq_policy *policy = NULL;
|
||||
struct amd_cpudata *cpudata = NULL;
|
||||
|
||||
highest_perf = amd_get_highest_perf();
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
policy = cpufreq_cpu_get(cpu);
|
||||
if (!policy)
|
||||
@ -143,6 +141,7 @@ static void amd_pstate_ut_check_perf(u32 index)
|
||||
goto skip_test;
|
||||
}
|
||||
|
||||
highest_perf = cppc_perf.highest_perf;
|
||||
nominal_perf = cppc_perf.nominal_perf;
|
||||
lowest_nonlinear_perf = cppc_perf.lowest_nonlinear_perf;
|
||||
lowest_perf = cppc_perf.lowest_perf;
|
||||
@ -154,6 +153,7 @@ static void amd_pstate_ut_check_perf(u32 index)
|
||||
goto skip_test;
|
||||
}
|
||||
|
||||
highest_perf = AMD_CPPC_HIGHEST_PERF(cap1);
|
||||
nominal_perf = AMD_CPPC_NOMINAL_PERF(cap1);
|
||||
lowest_nonlinear_perf = AMD_CPPC_LOWNONLIN_PERF(cap1);
|
||||
lowest_perf = AMD_CPPC_LOWEST_PERF(cap1);
|
||||
|
@ -14,10 +14,8 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_irq.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/regmap.h>
|
||||
|
@ -434,7 +434,11 @@ brcm_avs_get_freq_table(struct device *dev, struct private_data *priv)
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
|
||||
table = devm_kcalloc(dev, AVS_PSTATE_MAX + 1, sizeof(*table),
|
||||
/*
|
||||
* We allocate space for the 5 different P-STATES AVS,
|
||||
* plus extra space for a terminating element.
|
||||
*/
|
||||
table = devm_kcalloc(dev, AVS_PSTATE_MAX + 1 + 1, sizeof(*table),
|
||||
GFP_KERNEL);
|
||||
if (!table)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
@ -749,13 +753,11 @@ static int brcm_avs_cpufreq_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int brcm_avs_cpufreq_remove(struct platform_device *pdev)
|
||||
static void brcm_avs_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&brcm_avs_driver);
|
||||
|
||||
brcm_avs_prepare_uninit(pdev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id brcm_avs_cpufreq_match[] = {
|
||||
@ -770,7 +772,7 @@ static struct platform_driver brcm_avs_cpufreq_platdrv = {
|
||||
.of_match_table = brcm_avs_cpufreq_match,
|
||||
},
|
||||
.probe = brcm_avs_cpufreq_probe,
|
||||
.remove = brcm_avs_cpufreq_remove,
|
||||
.remove_new = brcm_avs_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(brcm_avs_cpufreq_platdrv);
|
||||
|
||||
|
@ -249,15 +249,19 @@ static void __init cppc_freq_invariance_init(void)
|
||||
return;
|
||||
|
||||
kworker_fie = kthread_create_worker(0, "cppc_fie");
|
||||
if (IS_ERR(kworker_fie))
|
||||
if (IS_ERR(kworker_fie)) {
|
||||
pr_warn("%s: failed to create kworker_fie: %ld\n", __func__,
|
||||
PTR_ERR(kworker_fie));
|
||||
fie_disabled = FIE_DISABLED;
|
||||
return;
|
||||
}
|
||||
|
||||
ret = sched_setattr_nocheck(kworker_fie->task, &attr);
|
||||
if (ret) {
|
||||
pr_warn("%s: failed to set SCHED_DEADLINE: %d\n", __func__,
|
||||
ret);
|
||||
kthread_destroy_worker(kworker_fie);
|
||||
return;
|
||||
fie_disabled = FIE_DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
@ -267,7 +271,6 @@ static void cppc_freq_invariance_exit(void)
|
||||
return;
|
||||
|
||||
kthread_destroy_worker(kworker_fie);
|
||||
kworker_fie = NULL;
|
||||
}
|
||||
|
||||
#else
|
||||
@ -849,13 +852,13 @@ static unsigned int cppc_cpufreq_get_rate(unsigned int cpu)
|
||||
|
||||
ret = cppc_get_perf_ctrs(cpu, &fb_ctrs_t0);
|
||||
if (ret)
|
||||
return ret;
|
||||
return 0;
|
||||
|
||||
udelay(2); /* 2usec delay between sampling */
|
||||
|
||||
ret = cppc_get_perf_ctrs(cpu, &fb_ctrs_t1);
|
||||
if (ret)
|
||||
return ret;
|
||||
return 0;
|
||||
|
||||
delivered_perf = cppc_perf_from_fbctrs(cpu_data, &fb_ctrs_t0,
|
||||
&fb_ctrs_t1);
|
||||
|
@ -143,14 +143,19 @@ static const struct of_device_id blocklist[] __initconst = {
|
||||
|
||||
{ .compatible = "qcom,apq8096", },
|
||||
{ .compatible = "qcom,msm8996", },
|
||||
{ .compatible = "qcom,msm8998", },
|
||||
{ .compatible = "qcom,qcm2290", },
|
||||
{ .compatible = "qcom,qcs404", },
|
||||
{ .compatible = "qcom,qdu1000", },
|
||||
{ .compatible = "qcom,sa8155p" },
|
||||
{ .compatible = "qcom,sa8540p" },
|
||||
{ .compatible = "qcom,sa8775p" },
|
||||
{ .compatible = "qcom,sc7180", },
|
||||
{ .compatible = "qcom,sc7280", },
|
||||
{ .compatible = "qcom,sc8180x", },
|
||||
{ .compatible = "qcom,sc8280xp", },
|
||||
{ .compatible = "qcom,sdm845", },
|
||||
{ .compatible = "qcom,sdx75", },
|
||||
{ .compatible = "qcom,sm6115", },
|
||||
{ .compatible = "qcom,sm6350", },
|
||||
{ .compatible = "qcom,sm6375", },
|
||||
@ -158,6 +163,8 @@ static const struct of_device_id blocklist[] __initconst = {
|
||||
{ .compatible = "qcom,sm8150", },
|
||||
{ .compatible = "qcom,sm8250", },
|
||||
{ .compatible = "qcom,sm8350", },
|
||||
{ .compatible = "qcom,sm8450", },
|
||||
{ .compatible = "qcom,sm8550", },
|
||||
|
||||
{ .compatible = "st,stih407", },
|
||||
{ .compatible = "st,stih410", },
|
||||
|
@ -349,11 +349,10 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dt_cpufreq_remove(struct platform_device *pdev)
|
||||
static void dt_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&dt_cpufreq_driver);
|
||||
dt_cpufreq_release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver dt_cpufreq_platdrv = {
|
||||
@ -361,7 +360,7 @@ static struct platform_driver dt_cpufreq_platdrv = {
|
||||
.name = "cpufreq-dt",
|
||||
},
|
||||
.probe = dt_cpufreq_probe,
|
||||
.remove = dt_cpufreq_remove,
|
||||
.remove_new = dt_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(dt_cpufreq_platdrv);
|
||||
|
||||
|
@ -1234,16 +1234,16 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
|
||||
ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN,
|
||||
&policy->nb_min);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n",
|
||||
ret, cpumask_pr_args(policy->cpus));
|
||||
dev_err(dev, "Failed to register MIN QoS notifier: %d (CPU%u)\n",
|
||||
ret, cpu);
|
||||
goto err_kobj_remove;
|
||||
}
|
||||
|
||||
ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MAX,
|
||||
&policy->nb_max);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n",
|
||||
ret, cpumask_pr_args(policy->cpus));
|
||||
dev_err(dev, "Failed to register MAX QoS notifier: %d (CPU%u)\n",
|
||||
ret, cpu);
|
||||
goto err_min_qos_notifier;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ static int __init davinci_cpufreq_probe(struct platform_device *pdev)
|
||||
return cpufreq_register_driver(&davinci_driver);
|
||||
}
|
||||
|
||||
static int __exit davinci_cpufreq_remove(struct platform_device *pdev)
|
||||
static void __exit davinci_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&davinci_driver);
|
||||
|
||||
@ -139,15 +139,13 @@ static int __exit davinci_cpufreq_remove(struct platform_device *pdev)
|
||||
|
||||
if (cpufreq.asyncclk)
|
||||
clk_put(cpufreq.asyncclk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver davinci_cpufreq_driver = {
|
||||
.driver = {
|
||||
.name = "cpufreq-davinci",
|
||||
},
|
||||
.remove = __exit_p(davinci_cpufreq_remove),
|
||||
.remove_new = __exit_p(davinci_cpufreq_remove),
|
||||
};
|
||||
|
||||
int __init davinci_cpufreq_init(void)
|
||||
|
@ -172,20 +172,18 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int imx_cpufreq_dt_remove(struct platform_device *pdev)
|
||||
static void imx_cpufreq_dt_remove(struct platform_device *pdev)
|
||||
{
|
||||
platform_device_unregister(cpufreq_dt_pdev);
|
||||
if (!of_machine_is_compatible("fsl,imx7ulp"))
|
||||
dev_pm_opp_put_supported_hw(cpufreq_opp_token);
|
||||
else
|
||||
clk_bulk_put(ARRAY_SIZE(imx7ulp_clks), imx7ulp_clks);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver imx_cpufreq_dt_driver = {
|
||||
.probe = imx_cpufreq_dt_probe,
|
||||
.remove = imx_cpufreq_dt_remove,
|
||||
.remove_new = imx_cpufreq_dt_remove,
|
||||
.driver = {
|
||||
.name = "imx-cpufreq-dt",
|
||||
},
|
||||
|
@ -519,7 +519,7 @@ put_node:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int imx6q_cpufreq_remove(struct platform_device *pdev)
|
||||
static void imx6q_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&imx6q_cpufreq_driver);
|
||||
dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
|
||||
@ -530,8 +530,6 @@ static int imx6q_cpufreq_remove(struct platform_device *pdev)
|
||||
regulator_put(soc_reg);
|
||||
|
||||
clk_bulk_put(num_clks, clks);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver imx6q_cpufreq_platdrv = {
|
||||
@ -539,7 +537,7 @@ static struct platform_driver imx6q_cpufreq_platdrv = {
|
||||
.name = "imx6q-cpufreq",
|
||||
},
|
||||
.probe = imx6q_cpufreq_probe,
|
||||
.remove = imx6q_cpufreq_remove,
|
||||
.remove_new = imx6q_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(imx6q_cpufreq_platdrv);
|
||||
|
||||
|
@ -178,20 +178,18 @@ out_node:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int kirkwood_cpufreq_remove(struct platform_device *pdev)
|
||||
static void kirkwood_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&kirkwood_cpufreq_driver);
|
||||
|
||||
clk_disable_unprepare(priv.powersave_clk);
|
||||
clk_disable_unprepare(priv.ddr_clk);
|
||||
clk_disable_unprepare(priv.cpu_clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver kirkwood_cpufreq_platform_driver = {
|
||||
.probe = kirkwood_cpufreq_probe,
|
||||
.remove = kirkwood_cpufreq_remove,
|
||||
.remove_new = kirkwood_cpufreq_remove,
|
||||
.driver = {
|
||||
.name = "kirkwood-cpufreq",
|
||||
},
|
||||
|
@ -10,8 +10,9 @@
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#define LUT_MAX_ENTRIES 32U
|
||||
@ -315,11 +316,9 @@ static int mtk_cpufreq_hw_driver_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mtk_cpufreq_hw_driver_remove(struct platform_device *pdev)
|
||||
static void mtk_cpufreq_hw_driver_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&cpufreq_mtk_hw_driver);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id mtk_cpufreq_hw_match[] = {
|
||||
@ -330,7 +329,7 @@ MODULE_DEVICE_TABLE(of, mtk_cpufreq_hw_match);
|
||||
|
||||
static struct platform_driver mtk_cpufreq_hw_driver = {
|
||||
.probe = mtk_cpufreq_hw_driver_probe,
|
||||
.remove = mtk_cpufreq_hw_driver_remove,
|
||||
.remove_new = mtk_cpufreq_hw_driver_remove,
|
||||
.driver = {
|
||||
.name = "mtk-cpufreq-hw",
|
||||
.of_match_table = mtk_cpufreq_hw_match,
|
||||
|
@ -313,8 +313,6 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define DYNAMIC_POWER "dynamic-power-coefficient"
|
||||
|
||||
static int mtk_cpufreq_opp_notifier(struct notifier_block *nb,
|
||||
unsigned long event, void *data)
|
||||
{
|
||||
|
@ -182,11 +182,9 @@ static int omap_cpufreq_probe(struct platform_device *pdev)
|
||||
return cpufreq_register_driver(&omap_driver);
|
||||
}
|
||||
|
||||
static int omap_cpufreq_remove(struct platform_device *pdev)
|
||||
static void omap_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&omap_driver);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver omap_cpufreq_platdrv = {
|
||||
@ -194,7 +192,7 @@ static struct platform_driver omap_cpufreq_platdrv = {
|
||||
.name = "omap-cpufreq",
|
||||
},
|
||||
.probe = omap_cpufreq_probe,
|
||||
.remove = omap_cpufreq_remove,
|
||||
.remove_new = omap_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(omap_cpufreq_platdrv);
|
||||
|
||||
|
@ -608,22 +608,20 @@ static int __init pcc_cpufreq_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int pcc_cpufreq_remove(struct platform_device *pdev)
|
||||
static void pcc_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&pcc_cpufreq_driver);
|
||||
|
||||
pcc_clear_mapping();
|
||||
|
||||
free_percpu(pcc_cpu_info);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver pcc_cpufreq_platdrv = {
|
||||
.driver = {
|
||||
.name = "pcc-cpufreq",
|
||||
},
|
||||
.remove = pcc_cpufreq_remove,
|
||||
.remove_new = pcc_cpufreq_remove,
|
||||
};
|
||||
|
||||
static int __init pcc_cpufreq_init(void)
|
||||
|
@ -1101,7 +1101,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol)
|
||||
|
||||
kfree(data->powernow_table);
|
||||
kfree(data);
|
||||
for_each_cpu(cpu, pol->cpus)
|
||||
/* pol->cpus will be empty here, use related_cpus instead. */
|
||||
for_each_cpu(cpu, pol->related_cpus)
|
||||
per_cpu(powernow_data, cpu) = NULL;
|
||||
|
||||
return 0;
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <linux/cpufreq.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#include <asm/machdep.h>
|
||||
#include <asm/cell-regs.h>
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/pm_qos.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#define GT_IRQ_STATUS BIT(2)
|
||||
|
||||
#define MAX_FREQ_DOMAINS 3
|
||||
#define MAX_FREQ_DOMAINS 4
|
||||
|
||||
struct qcom_cpufreq_soc_data {
|
||||
u32 reg_enable;
|
||||
@ -730,16 +730,14 @@ static int qcom_cpufreq_hw_driver_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int qcom_cpufreq_hw_driver_remove(struct platform_device *pdev)
|
||||
static void qcom_cpufreq_hw_driver_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&cpufreq_qcom_hw_driver);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver qcom_cpufreq_hw_driver = {
|
||||
.probe = qcom_cpufreq_hw_driver_probe,
|
||||
.remove = qcom_cpufreq_hw_driver_remove,
|
||||
.remove_new = qcom_cpufreq_hw_driver_remove,
|
||||
.driver = {
|
||||
.name = "qcom-cpufreq-hw",
|
||||
.of_match_table = qcom_cpufreq_hw_match,
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/nvmem-consumer.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_domain.h>
|
||||
#include <linux/pm_opp.h>
|
||||
@ -334,7 +333,7 @@ free_drv:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int qcom_cpufreq_remove(struct platform_device *pdev)
|
||||
static void qcom_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct qcom_cpufreq_drv *drv = platform_get_drvdata(pdev);
|
||||
unsigned int cpu;
|
||||
@ -346,13 +345,11 @@ static int qcom_cpufreq_remove(struct platform_device *pdev)
|
||||
|
||||
kfree(drv->opp_tokens);
|
||||
kfree(drv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver qcom_cpufreq_driver = {
|
||||
.probe = qcom_cpufreq_probe,
|
||||
.remove = qcom_cpufreq_remove,
|
||||
.remove_new = qcom_cpufreq_remove,
|
||||
.driver = {
|
||||
.name = "qcom-cpufreq-nvmem",
|
||||
},
|
||||
|
@ -288,11 +288,9 @@ static int qoriq_cpufreq_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int qoriq_cpufreq_remove(struct platform_device *pdev)
|
||||
static void qoriq_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&qoriq_cpufreq_driver);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver qoriq_cpufreq_platform_driver = {
|
||||
@ -300,7 +298,7 @@ static struct platform_driver qoriq_cpufreq_platform_driver = {
|
||||
.name = "qoriq-cpufreq",
|
||||
},
|
||||
.probe = qoriq_cpufreq_probe,
|
||||
.remove = qoriq_cpufreq_remove,
|
||||
.remove_new = qoriq_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(qoriq_cpufreq_platform_driver);
|
||||
|
||||
|
@ -65,7 +65,7 @@ remove_opp:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int raspberrypi_cpufreq_remove(struct platform_device *pdev)
|
||||
static void raspberrypi_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct device *cpu_dev;
|
||||
|
||||
@ -74,8 +74,6 @@ static int raspberrypi_cpufreq_remove(struct platform_device *pdev)
|
||||
dev_pm_opp_remove_all_dynamic(cpu_dev);
|
||||
|
||||
platform_device_unregister(cpufreq_dt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -87,7 +85,7 @@ static struct platform_driver raspberrypi_cpufreq_driver = {
|
||||
.name = "raspberrypi-cpufreq",
|
||||
},
|
||||
.probe = raspberrypi_cpufreq_probe,
|
||||
.remove = raspberrypi_cpufreq_remove,
|
||||
.remove_new = raspberrypi_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(raspberrypi_cpufreq_driver);
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <linux/cpumask.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/scpi_protocol.h>
|
||||
#include <linux/slab.h>
|
||||
@ -208,11 +208,10 @@ static int scpi_cpufreq_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int scpi_cpufreq_remove(struct platform_device *pdev)
|
||||
static void scpi_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&scpi_cpufreq_driver);
|
||||
scpi_ops = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver scpi_cpufreq_platdrv = {
|
||||
@ -220,7 +219,7 @@ static struct platform_driver scpi_cpufreq_platdrv = {
|
||||
.name = "scpi-cpufreq",
|
||||
},
|
||||
.probe = scpi_cpufreq_probe,
|
||||
.remove = scpi_cpufreq_remove,
|
||||
.remove_new = scpi_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(scpi_cpufreq_platdrv);
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
|
@ -137,7 +137,7 @@ free_opp:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sun50i_cpufreq_nvmem_remove(struct platform_device *pdev)
|
||||
static void sun50i_cpufreq_nvmem_remove(struct platform_device *pdev)
|
||||
{
|
||||
int *opp_tokens = platform_get_drvdata(pdev);
|
||||
unsigned int cpu;
|
||||
@ -148,13 +148,11 @@ static int sun50i_cpufreq_nvmem_remove(struct platform_device *pdev)
|
||||
dev_pm_opp_put_prop_name(opp_tokens[cpu]);
|
||||
|
||||
kfree(opp_tokens);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver sun50i_cpufreq_driver = {
|
||||
.probe = sun50i_cpufreq_nvmem_probe,
|
||||
.remove = sun50i_cpufreq_nvmem_remove,
|
||||
.remove_new = sun50i_cpufreq_nvmem_remove,
|
||||
.driver = {
|
||||
.name = "sun50i-cpufreq-nvmem",
|
||||
},
|
||||
|
@ -259,11 +259,9 @@ put_bpmp:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int tegra186_cpufreq_remove(struct platform_device *pdev)
|
||||
static void tegra186_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&tegra186_cpufreq_driver);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id tegra186_cpufreq_of_match[] = {
|
||||
@ -278,7 +276,7 @@ static struct platform_driver tegra186_cpufreq_platform_driver = {
|
||||
.of_match_table = tegra186_cpufreq_of_match,
|
||||
},
|
||||
.probe = tegra186_cpufreq_probe,
|
||||
.remove = tegra186_cpufreq_remove,
|
||||
.remove_new = tegra186_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(tegra186_cpufreq_platform_driver);
|
||||
|
||||
|
@ -508,6 +508,32 @@ static int tegra194_cpufreq_init(struct cpufreq_policy *policy)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra194_cpufreq_online(struct cpufreq_policy *policy)
|
||||
{
|
||||
/* We did light-weight tear down earlier, nothing to do here */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra194_cpufreq_offline(struct cpufreq_policy *policy)
|
||||
{
|
||||
/*
|
||||
* Preserve policy->driver_data and don't free resources on light-weight
|
||||
* tear down.
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra194_cpufreq_exit(struct cpufreq_policy *policy)
|
||||
{
|
||||
struct device *cpu_dev = get_cpu_device(policy->cpu);
|
||||
|
||||
dev_pm_opp_remove_all_dynamic(cpu_dev);
|
||||
dev_pm_opp_of_cpumask_remove_table(policy->related_cpus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra194_cpufreq_set_target(struct cpufreq_policy *policy,
|
||||
unsigned int index)
|
||||
{
|
||||
@ -535,6 +561,9 @@ static struct cpufreq_driver tegra194_cpufreq_driver = {
|
||||
.target_index = tegra194_cpufreq_set_target,
|
||||
.get = tegra194_get_speed,
|
||||
.init = tegra194_cpufreq_init,
|
||||
.exit = tegra194_cpufreq_exit,
|
||||
.online = tegra194_cpufreq_online,
|
||||
.offline = tegra194_cpufreq_offline,
|
||||
.attr = cpufreq_generic_attr,
|
||||
};
|
||||
|
||||
@ -708,12 +737,10 @@ put_bpmp:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int tegra194_cpufreq_remove(struct platform_device *pdev)
|
||||
static void tegra194_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
cpufreq_unregister_driver(&tegra194_cpufreq_driver);
|
||||
tegra194_cpufreq_free_resources();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id tegra194_cpufreq_of_match[] = {
|
||||
@ -730,7 +757,7 @@ static struct platform_driver tegra194_ccplex_driver = {
|
||||
.of_match_table = tegra194_cpufreq_of_match,
|
||||
},
|
||||
.probe = tegra194_cpufreq_probe,
|
||||
.remove = tegra194_cpufreq_remove,
|
||||
.remove_new = tegra194_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(tegra194_ccplex_driver);
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_opp.h>
|
||||
#include <linux/slab.h>
|
||||
@ -552,7 +551,7 @@ static int ve_spc_cpufreq_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ve_spc_cpufreq_remove(struct platform_device *pdev)
|
||||
static void ve_spc_cpufreq_remove(struct platform_device *pdev)
|
||||
{
|
||||
bL_switcher_get_enabled();
|
||||
__bLs_unregister_notifier();
|
||||
@ -560,7 +559,6 @@ static int ve_spc_cpufreq_remove(struct platform_device *pdev)
|
||||
bL_switcher_put_enabled();
|
||||
pr_info("%s: Un-registered platform driver: %s\n", __func__,
|
||||
ve_spc_cpufreq_driver.name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct platform_driver ve_spc_cpufreq_platdrv = {
|
||||
@ -568,7 +566,7 @@ static struct platform_driver ve_spc_cpufreq_platdrv = {
|
||||
.name = "vexpress-spc-cpufreq",
|
||||
},
|
||||
.probe = ve_spc_cpufreq_probe,
|
||||
.remove = ve_spc_cpufreq_remove,
|
||||
.remove_new = ve_spc_cpufreq_remove,
|
||||
};
|
||||
module_platform_driver(ve_spc_cpufreq_platdrv);
|
||||
|
||||
|
@ -371,7 +371,7 @@ struct cpufreq_driver {
|
||||
int (*target_intermediate)(struct cpufreq_policy *policy,
|
||||
unsigned int index);
|
||||
|
||||
/* should be defined, if possible */
|
||||
/* should be defined, if possible, return 0 on error */
|
||||
unsigned int (*get)(unsigned int cpu);
|
||||
|
||||
/* Called to update policy limits on firmware notifications. */
|
||||
|
Loading…
Reference in New Issue
Block a user