mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
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:
@@ -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>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user