cpufreq arm fixes / cleanups for 6.1-rc
- Fix module loading in Tegra124 driver (Jon Hunter). - Fix memory leak and update to read-only region in qcom driver (Fabien Parent). - Miscellaneous minor cleanups to cpufreq drivers (Fabien Parent and Yang Yingliang). -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEx73Crsp7f6M6scA70rkcPK6BEhwFAmNOhnoACgkQ0rkcPK6B Ehy8Cg/9HejtmwyW0S7mgBdG8+mleDDwOMSsWxnQ2dHBPeip4f1ivJbSeyst+/k0 Y4wVwggAFKf6295s93+aBuyomtJR+18PwJe/HrGemj2SiicL4gQ53n5WjO2Xz4ce VMVQY8lZ9u97t6TxF8SarG2pFK/bHF+wk541NKJ+3EVIGYltlFN+rDEwIEPHqq1S EjF7+qXAxDDMKLlNWD7gqFxylPU0o+SHHsmgb4TY72hjpL9i1KeHY5BT+FLgCto0 d0ZEENdHhLR1zILJziFDWaDMTG0W3mgztMJK/4HYtLCNYn14iaEf/Q2Ry/5t8f1u N1Kzy3msnIA0B8YfcFyUaOBpGW9nnVHHwZaqO3gbvEGAPoXz2wiKg4MbC9x+cAho vk2JrGqG80j5lEDLPuQtj0x6NBl8+4Vo6e/0uTnYpupNfqTE7LXkOWoiYLBxYbDX 7J4fP4PRvZHubOdKovBx6Um8FVioWKW41X7zgiNoVL7wCh7Y/Op8ecWGOXa/hOcZ MQV2TWMTKZweTleB4hclHk5nrmLgPt+qU+5mN2cPhFBkF8Jsg8vIcGJ1lozYnJM9 +KK1ukISaqMlDzWPcX7Gt5Mk1tZMv/jXhtSFdEvZNkk8PM2Zyqwv7bLZ4vuv479r rIlMO3k8Bxjd30WsMtQmeR0mDJ3l5I2W965XQp1c2zFVk9GHe3o= =1R1A -----END PGP SIGNATURE----- Merge tag 'cpufreq-arm-fixes-6.1-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq ARM fixes / cleanups for 6.1-rc from Viresh Kumar: "- Fix module loading in Tegra124 driver (Jon Hunter). - Fix memory leak and update to read-only region in qcom driver (Fabien Parent). - Miscellaneous minor cleanups to cpufreq drivers (Fabien Parent and Yang Yingliang)." * tag 'cpufreq-arm-fixes-6.1-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: sun50i: Switch to use dev_err_probe() helper cpufreq: qcom-nvmem: Switch to use dev_err_probe() helper cpufreq: imx6q: Switch to use dev_err_probe() helper cpufreq: dt: Switch to use dev_err_probe() helper cpufreq: qcom: remove unused parameter in function definition cpufreq: qcom: fix writes in read-only memory region cpufreq: qcom: fix memory leak in error path cpufreq: tegra194: Fix module loading
This commit is contained in:
commit
a6991d623d
@ -222,10 +222,8 @@ static int dt_cpufreq_early_init(struct device *dev, int cpu)
|
||||
if (reg_name[0]) {
|
||||
priv->opp_token = dev_pm_opp_set_regulators(cpu_dev, reg_name);
|
||||
if (priv->opp_token < 0) {
|
||||
ret = priv->opp_token;
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(cpu_dev, "failed to set regulators: %d\n",
|
||||
ret);
|
||||
ret = dev_err_probe(cpu_dev, priv->opp_token,
|
||||
"failed to set regulators\n");
|
||||
goto free_cpumask;
|
||||
}
|
||||
}
|
||||
|
@ -396,9 +396,7 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
|
||||
ret = imx6q_opp_check_speed_grading(cpu_dev);
|
||||
}
|
||||
if (ret) {
|
||||
if (ret != -EPROBE_DEFER)
|
||||
dev_err(cpu_dev, "failed to read ocotp: %d\n",
|
||||
ret);
|
||||
dev_err_probe(cpu_dev, ret, "failed to read ocotp\n");
|
||||
goto out_free_opp;
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ static struct platform_device *cpufreq_dt_pdev, *cpufreq_pdev;
|
||||
|
||||
static void get_krait_bin_format_a(struct device *cpu_dev,
|
||||
int *speed, int *pvs, int *pvs_ver,
|
||||
struct nvmem_cell *pvs_nvmem, u8 *buf)
|
||||
u8 *buf)
|
||||
{
|
||||
u32 pte_efuse;
|
||||
|
||||
@ -95,7 +95,7 @@ static void get_krait_bin_format_a(struct device *cpu_dev,
|
||||
|
||||
static void get_krait_bin_format_b(struct device *cpu_dev,
|
||||
int *speed, int *pvs, int *pvs_ver,
|
||||
struct nvmem_cell *pvs_nvmem, u8 *buf)
|
||||
u8 *buf)
|
||||
{
|
||||
u32 pte_efuse, redundant_sel;
|
||||
|
||||
@ -213,6 +213,7 @@ static int qcom_cpufreq_krait_name_version(struct device *cpu_dev,
|
||||
int speed = 0, pvs = 0, pvs_ver = 0;
|
||||
u8 *speedbin;
|
||||
size_t len;
|
||||
int ret = 0;
|
||||
|
||||
speedbin = nvmem_cell_read(speedbin_nvmem, &len);
|
||||
|
||||
@ -222,15 +223,16 @@ static int qcom_cpufreq_krait_name_version(struct device *cpu_dev,
|
||||
switch (len) {
|
||||
case 4:
|
||||
get_krait_bin_format_a(cpu_dev, &speed, &pvs, &pvs_ver,
|
||||
speedbin_nvmem, speedbin);
|
||||
speedbin);
|
||||
break;
|
||||
case 8:
|
||||
get_krait_bin_format_b(cpu_dev, &speed, &pvs, &pvs_ver,
|
||||
speedbin_nvmem, speedbin);
|
||||
speedbin);
|
||||
break;
|
||||
default:
|
||||
dev_err(cpu_dev, "Unable to read nvmem data. Defaulting to 0!\n");
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto len_error;
|
||||
}
|
||||
|
||||
snprintf(*pvs_name, sizeof("speedXX-pvsXX-vXX"), "speed%d-pvs%d-v%d",
|
||||
@ -238,8 +240,9 @@ static int qcom_cpufreq_krait_name_version(struct device *cpu_dev,
|
||||
|
||||
drv->versions = (1 << speed);
|
||||
|
||||
len_error:
|
||||
kfree(speedbin);
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct qcom_cpufreq_match_data match_data_kryo = {
|
||||
@ -262,7 +265,8 @@ static int qcom_cpufreq_probe(struct platform_device *pdev)
|
||||
struct nvmem_cell *speedbin_nvmem;
|
||||
struct device_node *np;
|
||||
struct device *cpu_dev;
|
||||
char *pvs_name = "speedXX-pvsXX-vXX";
|
||||
char pvs_name_buffer[] = "speedXX-pvsXX-vXX";
|
||||
char *pvs_name = pvs_name_buffer;
|
||||
unsigned cpu;
|
||||
const struct of_device_id *match;
|
||||
int ret;
|
||||
@ -295,11 +299,8 @@ static int qcom_cpufreq_probe(struct platform_device *pdev)
|
||||
if (drv->data->get_version) {
|
||||
speedbin_nvmem = of_nvmem_cell_get(np, NULL);
|
||||
if (IS_ERR(speedbin_nvmem)) {
|
||||
if (PTR_ERR(speedbin_nvmem) != -EPROBE_DEFER)
|
||||
dev_err(cpu_dev,
|
||||
"Could not get nvmem cell: %ld\n",
|
||||
PTR_ERR(speedbin_nvmem));
|
||||
ret = PTR_ERR(speedbin_nvmem);
|
||||
ret = dev_err_probe(cpu_dev, PTR_ERR(speedbin_nvmem),
|
||||
"Could not get nvmem cell\n");
|
||||
goto free_drv;
|
||||
}
|
||||
|
||||
|
@ -56,12 +56,9 @@ static int sun50i_cpufreq_get_efuse(u32 *versions)
|
||||
|
||||
speedbin_nvmem = of_nvmem_cell_get(np, NULL);
|
||||
of_node_put(np);
|
||||
if (IS_ERR(speedbin_nvmem)) {
|
||||
if (PTR_ERR(speedbin_nvmem) != -EPROBE_DEFER)
|
||||
pr_err("Could not get nvmem cell: %ld\n",
|
||||
PTR_ERR(speedbin_nvmem));
|
||||
return PTR_ERR(speedbin_nvmem);
|
||||
}
|
||||
if (IS_ERR(speedbin_nvmem))
|
||||
return dev_err_probe(cpu_dev, PTR_ERR(speedbin_nvmem),
|
||||
"Could not get nvmem cell\n");
|
||||
|
||||
speedbin = nvmem_cell_read(speedbin_nvmem, &len);
|
||||
nvmem_cell_put(speedbin_nvmem);
|
||||
|
@ -589,6 +589,7 @@ static const struct of_device_id tegra194_cpufreq_of_match[] = {
|
||||
{ .compatible = "nvidia,tegra239-ccplex-cluster", .data = &tegra239_cpufreq_soc },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, tegra194_cpufreq_of_match);
|
||||
|
||||
static struct platform_driver tegra194_ccplex_driver = {
|
||||
.driver = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user