2020-08-10 11:46:35 +00:00
|
|
|
From a8811ec764f95a04ba82f6f457e28c5e9e36e36b Mon Sep 17 00:00:00 2001
|
|
|
|
From: Ansuel Smith <ansuelsmth@gmail.com>
|
|
|
|
Date: Fri, 13 Mar 2020 18:52:13 +0100
|
|
|
|
Subject: cpufreq: qcom: Add support for krait based socs
|
2020-01-26 03:47:49 +00:00
|
|
|
|
|
|
|
In Certain QCOM SoCs like ipq8064, apq8064, msm8960, msm8974
|
|
|
|
that has KRAIT processors the voltage/current value of each OPP
|
|
|
|
varies based on the silicon variant in use.
|
|
|
|
|
|
|
|
The required OPP related data is determined based on
|
|
|
|
the efuse value. This is similar to the existing code for
|
|
|
|
kryo cores. So adding support for krait cores here.
|
|
|
|
|
|
|
|
Signed-off-by: Sricharan R <sricharan@codeaurora.org>
|
2020-08-10 11:46:35 +00:00
|
|
|
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
|
|
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
|
2020-01-26 03:47:49 +00:00
|
|
|
---
|
|
|
|
.../devicetree/bindings/opp/qcom-nvmem-cpufreq.txt | 3 +-
|
|
|
|
drivers/cpufreq/Kconfig.arm | 2 +-
|
|
|
|
drivers/cpufreq/cpufreq-dt-platdev.c | 5 +
|
2020-08-10 11:46:35 +00:00
|
|
|
drivers/cpufreq/qcom-cpufreq-nvmem.c | 191 +++++++++++++++++++--
|
|
|
|
4 files changed, 183 insertions(+), 18 deletions(-)
|
2020-01-26 03:47:49 +00:00
|
|
|
|
2020-08-10 11:46:35 +00:00
|
|
|
--- a/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt
|
|
|
|
+++ b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt
|
|
|
|
@@ -19,7 +19,8 @@ In 'cpu' nodes:
|
2020-01-26 03:47:49 +00:00
|
|
|
|
2020-08-10 11:46:35 +00:00
|
|
|
In 'operating-points-v2' table:
|
|
|
|
- compatible: Should be
|
|
|
|
- - 'operating-points-v2-kryo-cpu' for apq8096 and msm8996.
|
|
|
|
+ - 'operating-points-v2-kryo-cpu' for apq8096, msm8996, msm8974,
|
|
|
|
+ apq8064, ipq8064, msm8960 and ipq8074.
|
|
|
|
|
|
|
|
Optional properties:
|
|
|
|
--------------------
|
2020-01-26 03:47:49 +00:00
|
|
|
--- a/drivers/cpufreq/Kconfig.arm
|
|
|
|
+++ b/drivers/cpufreq/Kconfig.arm
|
2020-08-19 11:25:42 +00:00
|
|
|
@@ -135,7 +135,7 @@ config ARM_OMAP2PLUS_CPUFREQ
|
2020-01-26 03:47:49 +00:00
|
|
|
|
|
|
|
config ARM_QCOM_CPUFREQ_NVMEM
|
|
|
|
tristate "Qualcomm nvmem based CPUFreq"
|
|
|
|
- depends on ARM64
|
|
|
|
+ depends on ARCH_QCOM
|
|
|
|
depends on QCOM_QFPROM
|
|
|
|
depends on QCOM_SMEM
|
|
|
|
select PM_OPP
|
|
|
|
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
|
|
|
|
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
|
2020-01-26 03:29:56 +00:00
|
|
|
@@ -138,6 +138,11 @@ static const struct of_device_id blackli
|
2020-01-26 03:47:49 +00:00
|
|
|
{ .compatible = "ti,am43", },
|
|
|
|
{ .compatible = "ti,dra7", },
|
|
|
|
|
|
|
|
+ { .compatible = "qcom,ipq8064", },
|
|
|
|
+ { .compatible = "qcom,apq8064", },
|
|
|
|
+ { .compatible = "qcom,msm8974", },
|
|
|
|
+ { .compatible = "qcom,msm8960", },
|
|
|
|
+
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
|
|
|
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
|
2020-01-26 03:29:56 +00:00
|
|
|
@@ -49,12 +49,14 @@ struct qcom_cpufreq_drv;
|
2020-01-26 03:47:49 +00:00
|
|
|
struct qcom_cpufreq_match_data {
|
|
|
|
int (*get_version)(struct device *cpu_dev,
|
|
|
|
struct nvmem_cell *speedbin_nvmem,
|
|
|
|
+ char **pvs_name,
|
|
|
|
struct qcom_cpufreq_drv *drv);
|
2020-01-26 03:29:56 +00:00
|
|
|
const char **genpd_names;
|
2020-01-26 03:47:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct qcom_cpufreq_drv {
|
|
|
|
- struct opp_table **opp_tables;
|
2020-08-10 11:46:35 +00:00
|
|
|
+ struct opp_table **names_opp_tables;
|
|
|
|
+ struct opp_table **hw_opp_tables;
|
2020-01-26 03:29:56 +00:00
|
|
|
struct opp_table **genpd_opp_tables;
|
2020-01-26 03:47:49 +00:00
|
|
|
u32 versions;
|
|
|
|
const struct qcom_cpufreq_match_data *data;
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -62,6 +64,84 @@ struct qcom_cpufreq_drv {
|
2020-01-26 03:47:49 +00:00
|
|
|
|
|
|
|
static struct platform_device *cpufreq_dt_pdev, *cpufreq_pdev;
|
|
|
|
|
2020-08-10 11:46:35 +00:00
|
|
|
+static void get_krait_bin_format_a(struct device *cpu_dev,
|
|
|
|
+ int *speed, int *pvs, int *pvs_ver,
|
2020-01-26 03:47:49 +00:00
|
|
|
+ struct nvmem_cell *pvs_nvmem, u8 *buf)
|
|
|
|
+{
|
|
|
|
+ u32 pte_efuse;
|
|
|
|
+
|
|
|
|
+ pte_efuse = *((u32 *)buf);
|
|
|
|
+
|
|
|
|
+ *speed = pte_efuse & 0xf;
|
|
|
|
+ if (*speed == 0xf)
|
|
|
|
+ *speed = (pte_efuse >> 4) & 0xf;
|
|
|
|
+
|
|
|
|
+ if (*speed == 0xf) {
|
|
|
|
+ *speed = 0;
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_warn(cpu_dev, "Speed bin: Defaulting to %d\n", *speed);
|
2020-01-26 03:47:49 +00:00
|
|
|
+ } else {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_dbg(cpu_dev, "Speed bin: %d\n", *speed);
|
2020-01-26 03:47:49 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ *pvs = (pte_efuse >> 10) & 0x7;
|
|
|
|
+ if (*pvs == 0x7)
|
|
|
|
+ *pvs = (pte_efuse >> 13) & 0x7;
|
|
|
|
+
|
|
|
|
+ if (*pvs == 0x7) {
|
|
|
|
+ *pvs = 0;
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_warn(cpu_dev, "PVS bin: Defaulting to %d\n", *pvs);
|
2020-01-26 03:47:49 +00:00
|
|
|
+ } else {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs);
|
2020-01-26 03:47:49 +00:00
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
2020-08-10 11:46:35 +00:00
|
|
|
+static void get_krait_bin_format_b(struct device *cpu_dev,
|
|
|
|
+ int *speed, int *pvs, int *pvs_ver,
|
2020-01-26 03:47:49 +00:00
|
|
|
+ struct nvmem_cell *pvs_nvmem, u8 *buf)
|
|
|
|
+{
|
|
|
|
+ u32 pte_efuse, redundant_sel;
|
|
|
|
+
|
|
|
|
+ pte_efuse = *((u32 *)buf);
|
|
|
|
+ redundant_sel = (pte_efuse >> 24) & 0x7;
|
|
|
|
+
|
|
|
|
+ *pvs_ver = (pte_efuse >> 4) & 0x3;
|
|
|
|
+
|
|
|
|
+ switch (redundant_sel) {
|
|
|
|
+ case 1:
|
2020-08-10 11:46:35 +00:00
|
|
|
+ *pvs = ((pte_efuse >> 28) & 0x8) | ((pte_efuse >> 6) & 0x7);
|
2020-01-26 03:47:49 +00:00
|
|
|
+ *speed = (pte_efuse >> 27) & 0xf;
|
|
|
|
+ break;
|
|
|
|
+ case 2:
|
|
|
|
+ *pvs = (pte_efuse >> 27) & 0xf;
|
2020-08-10 11:46:35 +00:00
|
|
|
+ *speed = pte_efuse & 0x7;
|
2020-01-26 03:47:49 +00:00
|
|
|
+ break;
|
2020-08-10 11:46:35 +00:00
|
|
|
+ default:
|
|
|
|
+ /* 4 bits of PVS are in efuse register bits 31, 8-6. */
|
|
|
|
+ *pvs = ((pte_efuse >> 28) & 0x8) | ((pte_efuse >> 6) & 0x7);
|
|
|
|
+ *speed = pte_efuse & 0x7;
|
2020-01-26 03:47:49 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /* Check SPEED_BIN_BLOW_STATUS */
|
|
|
|
+ if (pte_efuse & BIT(3)) {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_dbg(cpu_dev, "Speed bin: %d\n", *speed);
|
2020-01-26 03:47:49 +00:00
|
|
|
+ } else {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_warn(cpu_dev, "Speed bin not set. Defaulting to 0!\n");
|
2020-01-26 03:47:49 +00:00
|
|
|
+ *speed = 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /* Check PVS_BLOW_STATUS */
|
|
|
|
+ pte_efuse = *(((u32 *)buf) + 4);
|
|
|
|
+ pte_efuse &= BIT(21);
|
|
|
|
+ if (pte_efuse) {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_dbg(cpu_dev, "PVS bin: %d\n", *pvs);
|
2020-01-26 03:47:49 +00:00
|
|
|
+ } else {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_warn(cpu_dev, "PVS bin not set. Defaulting to 0!\n");
|
2020-01-26 03:47:49 +00:00
|
|
|
+ *pvs = 0;
|
|
|
|
+ }
|
|
|
|
+
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_dbg(cpu_dev, "PVS version: %d\n", *pvs_ver);
|
2020-01-26 03:47:49 +00:00
|
|
|
+}
|
|
|
|
+
|
|
|
|
static enum _msm8996_version qcom_cpufreq_get_msm_id(void)
|
|
|
|
{
|
|
|
|
size_t len;
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -93,11 +173,13 @@ static enum _msm8996_version qcom_cpufre
|
2020-01-26 03:47:49 +00:00
|
|
|
|
|
|
|
static int qcom_cpufreq_kryo_name_version(struct device *cpu_dev,
|
|
|
|
struct nvmem_cell *speedbin_nvmem,
|
|
|
|
+ char **pvs_name,
|
|
|
|
struct qcom_cpufreq_drv *drv)
|
|
|
|
{
|
|
|
|
size_t len;
|
|
|
|
u8 *speedbin;
|
|
|
|
enum _msm8996_version msm8996_version;
|
|
|
|
+ *pvs_name = NULL;
|
|
|
|
|
|
|
|
msm8996_version = qcom_cpufreq_get_msm_id();
|
|
|
|
if (NUM_OF_MSM8996_VERSIONS == msm8996_version) {
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -125,10 +207,51 @@ static int qcom_cpufreq_kryo_name_versio
|
2020-01-26 03:47:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
+static int qcom_cpufreq_krait_name_version(struct device *cpu_dev,
|
|
|
|
+ struct nvmem_cell *speedbin_nvmem,
|
|
|
|
+ char **pvs_name,
|
|
|
|
+ struct qcom_cpufreq_drv *drv)
|
|
|
|
+{
|
|
|
|
+ int speed = 0, pvs = 0, pvs_ver = 0;
|
|
|
|
+ u8 *speedbin;
|
|
|
|
+ size_t len;
|
|
|
|
+
|
|
|
|
+ speedbin = nvmem_cell_read(speedbin_nvmem, &len);
|
2020-08-10 11:46:35 +00:00
|
|
|
+
|
|
|
|
+ if (IS_ERR(speedbin))
|
|
|
|
+ return PTR_ERR(speedbin);
|
|
|
|
+
|
|
|
|
+ switch (len) {
|
|
|
|
+ case 4:
|
|
|
|
+ get_krait_bin_format_a(cpu_dev, &speed, &pvs, &pvs_ver,
|
2020-01-26 03:47:49 +00:00
|
|
|
+ speedbin_nvmem, speedbin);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ break;
|
|
|
|
+ case 8:
|
|
|
|
+ get_krait_bin_format_b(cpu_dev, &speed, &pvs, &pvs_ver,
|
2020-01-26 03:47:49 +00:00
|
|
|
+ speedbin_nvmem, speedbin);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ break;
|
|
|
|
+ default:
|
2020-01-26 03:47:49 +00:00
|
|
|
+ dev_err(cpu_dev, "Unable to read nvmem data. Defaulting to 0!\n");
|
|
|
|
+ return -ENODEV;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ snprintf(*pvs_name, sizeof("speedXX-pvsXX-vXX"), "speed%d-pvs%d-v%d",
|
|
|
|
+ speed, pvs, pvs_ver);
|
|
|
|
+
|
|
|
|
+ drv->versions = (1 << speed);
|
|
|
|
+
|
|
|
|
+ kfree(speedbin);
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
static const struct qcom_cpufreq_match_data match_data_kryo = {
|
|
|
|
.get_version = qcom_cpufreq_kryo_name_version,
|
|
|
|
};
|
|
|
|
|
|
|
|
+static const struct qcom_cpufreq_match_data match_data_krait = {
|
|
|
|
+ .get_version = qcom_cpufreq_krait_name_version,
|
|
|
|
+};
|
|
|
|
+
|
2020-01-26 03:29:56 +00:00
|
|
|
static const char *qcs404_genpd_names[] = { "cpr", NULL };
|
|
|
|
|
|
|
|
static const struct qcom_cpufreq_match_data match_data_qcs404 = {
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -141,6 +264,7 @@ static int qcom_cpufreq_probe(struct pla
|
2020-01-26 03:47:49 +00:00
|
|
|
struct nvmem_cell *speedbin_nvmem;
|
|
|
|
struct device_node *np;
|
|
|
|
struct device *cpu_dev;
|
|
|
|
+ char *pvs_name = "speedXX-pvsXX-vXX";
|
|
|
|
unsigned cpu;
|
|
|
|
const struct of_device_id *match;
|
|
|
|
int ret;
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -153,7 +277,7 @@ static int qcom_cpufreq_probe(struct pla
|
2020-01-26 03:47:49 +00:00
|
|
|
if (!np)
|
|
|
|
return -ENOENT;
|
|
|
|
|
|
|
|
- ret = of_device_is_compatible(np, "operating-points-v2-kryo-cpu");
|
|
|
|
+ ret = of_device_is_compatible(np, "operating-points-v2-qcom-cpu");
|
|
|
|
if (!ret) {
|
|
|
|
of_node_put(np);
|
|
|
|
return -ENOENT;
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -181,7 +305,8 @@ static int qcom_cpufreq_probe(struct pla
|
2020-01-26 03:47:49 +00:00
|
|
|
goto free_drv;
|
|
|
|
}
|
|
|
|
|
|
|
|
- ret = drv->data->get_version(cpu_dev, speedbin_nvmem, drv);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ ret = drv->data->get_version(cpu_dev,
|
|
|
|
+ speedbin_nvmem, &pvs_name, drv);
|
2020-01-26 03:47:49 +00:00
|
|
|
if (ret) {
|
|
|
|
nvmem_cell_put(speedbin_nvmem);
|
|
|
|
goto free_drv;
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -190,12 +315,20 @@ static int qcom_cpufreq_probe(struct pla
|
2020-01-26 03:47:49 +00:00
|
|
|
}
|
|
|
|
of_node_put(np);
|
|
|
|
|
|
|
|
- drv->opp_tables = kcalloc(num_possible_cpus(), sizeof(*drv->opp_tables),
|
2020-08-10 11:46:35 +00:00
|
|
|
+ drv->names_opp_tables = kcalloc(num_possible_cpus(),
|
|
|
|
+ sizeof(*drv->names_opp_tables),
|
2020-01-26 03:47:49 +00:00
|
|
|
GFP_KERNEL);
|
|
|
|
- if (!drv->opp_tables) {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ if (!drv->names_opp_tables) {
|
2020-01-26 03:47:49 +00:00
|
|
|
ret = -ENOMEM;
|
|
|
|
goto free_drv;
|
|
|
|
}
|
2020-08-10 11:46:35 +00:00
|
|
|
+ drv->hw_opp_tables = kcalloc(num_possible_cpus(),
|
|
|
|
+ sizeof(*drv->hw_opp_tables),
|
2020-01-26 03:47:49 +00:00
|
|
|
+ GFP_KERNEL);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ if (!drv->hw_opp_tables) {
|
2020-01-26 03:47:49 +00:00
|
|
|
+ ret = -ENOMEM;
|
2020-08-10 11:46:35 +00:00
|
|
|
+ goto free_opp_names;
|
2020-01-26 03:47:49 +00:00
|
|
|
+ }
|
|
|
|
|
2020-01-26 03:29:56 +00:00
|
|
|
drv->genpd_opp_tables = kcalloc(num_possible_cpus(),
|
|
|
|
sizeof(*drv->genpd_opp_tables),
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -213,11 +346,23 @@ static int qcom_cpufreq_probe(struct pla
|
2020-01-26 03:47:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (drv->data->get_version) {
|
|
|
|
- drv->opp_tables[cpu] =
|
|
|
|
- dev_pm_opp_set_supported_hw(cpu_dev,
|
2020-08-10 11:46:35 +00:00
|
|
|
- &drv->versions, 1);
|
|
|
|
- if (IS_ERR(drv->opp_tables[cpu])) {
|
|
|
|
- ret = PTR_ERR(drv->opp_tables[cpu]);
|
2020-01-26 03:47:49 +00:00
|
|
|
+
|
|
|
|
+ if (pvs_name) {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ drv->names_opp_tables[cpu] = dev_pm_opp_set_prop_name(
|
|
|
|
+ cpu_dev,
|
2020-01-26 03:47:49 +00:00
|
|
|
+ pvs_name);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ if (IS_ERR(drv->names_opp_tables[cpu])) {
|
|
|
|
+ ret = PTR_ERR(drv->names_opp_tables[cpu]);
|
2020-01-26 03:47:49 +00:00
|
|
|
+ dev_err(cpu_dev, "Failed to add OPP name %s\n",
|
|
|
|
+ pvs_name);
|
|
|
|
+ goto free_opp;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
2020-08-10 11:46:35 +00:00
|
|
|
+ drv->hw_opp_tables[cpu] = dev_pm_opp_set_supported_hw(
|
|
|
|
+ cpu_dev, &drv->versions, 1);
|
|
|
|
+ if (IS_ERR(drv->hw_opp_tables[cpu])) {
|
|
|
|
+ ret = PTR_ERR(drv->hw_opp_tables[cpu]);
|
2020-01-26 03:47:49 +00:00
|
|
|
dev_err(cpu_dev,
|
|
|
|
"Failed to set supported hardware\n");
|
2020-01-26 03:29:56 +00:00
|
|
|
goto free_genpd_opp;
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -259,11 +404,18 @@ free_genpd_opp:
|
2020-01-26 03:29:56 +00:00
|
|
|
kfree(drv->genpd_opp_tables);
|
2020-01-26 03:47:49 +00:00
|
|
|
free_opp:
|
|
|
|
for_each_possible_cpu(cpu) {
|
|
|
|
- if (IS_ERR_OR_NULL(drv->opp_tables[cpu]))
|
2020-08-10 11:46:35 +00:00
|
|
|
+ if (IS_ERR_OR_NULL(drv->names_opp_tables[cpu]))
|
2020-01-26 03:29:56 +00:00
|
|
|
+ break;
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_pm_opp_put_prop_name(drv->names_opp_tables[cpu]);
|
2020-01-26 03:29:56 +00:00
|
|
|
+ }
|
2020-01-26 03:47:49 +00:00
|
|
|
+ for_each_possible_cpu(cpu) {
|
2020-08-10 11:46:35 +00:00
|
|
|
+ if (IS_ERR_OR_NULL(drv->hw_opp_tables[cpu]))
|
2020-01-26 03:29:56 +00:00
|
|
|
break;
|
|
|
|
- dev_pm_opp_put_supported_hw(drv->opp_tables[cpu]);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ dev_pm_opp_put_supported_hw(drv->hw_opp_tables[cpu]);
|
2020-01-26 03:29:56 +00:00
|
|
|
}
|
|
|
|
- kfree(drv->opp_tables);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ kfree(drv->hw_opp_tables);
|
|
|
|
+free_opp_names:
|
|
|
|
+ kfree(drv->names_opp_tables);
|
2020-01-26 03:47:49 +00:00
|
|
|
free_drv:
|
|
|
|
kfree(drv);
|
|
|
|
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -278,13 +430,16 @@ static int qcom_cpufreq_remove(struct pl
|
2020-01-26 03:47:49 +00:00
|
|
|
platform_device_unregister(cpufreq_dt_pdev);
|
|
|
|
|
2020-01-26 03:29:56 +00:00
|
|
|
for_each_possible_cpu(cpu) {
|
2020-01-26 03:47:49 +00:00
|
|
|
- if (drv->opp_tables[cpu])
|
|
|
|
- dev_pm_opp_put_supported_hw(drv->opp_tables[cpu]);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ if (drv->names_opp_tables[cpu])
|
|
|
|
+ dev_pm_opp_put_supported_hw(drv->names_opp_tables[cpu]);
|
|
|
|
+ if (drv->hw_opp_tables[cpu])
|
|
|
|
+ dev_pm_opp_put_supported_hw(drv->hw_opp_tables[cpu]);
|
2020-01-26 03:29:56 +00:00
|
|
|
if (drv->genpd_opp_tables[cpu])
|
|
|
|
dev_pm_opp_detach_genpd(drv->genpd_opp_tables[cpu]);
|
|
|
|
}
|
2020-01-26 03:47:49 +00:00
|
|
|
|
|
|
|
- kfree(drv->opp_tables);
|
2020-08-10 11:46:35 +00:00
|
|
|
+ kfree(drv->names_opp_tables);
|
|
|
|
+ kfree(drv->hw_opp_tables);
|
2020-01-26 03:29:56 +00:00
|
|
|
kfree(drv->genpd_opp_tables);
|
2020-01-26 03:47:49 +00:00
|
|
|
kfree(drv);
|
|
|
|
|
2020-08-10 11:46:35 +00:00
|
|
|
@@ -303,6 +458,10 @@ static const struct of_device_id qcom_cp
|
2020-01-26 03:47:49 +00:00
|
|
|
{ .compatible = "qcom,apq8096", .data = &match_data_kryo },
|
|
|
|
{ .compatible = "qcom,msm8996", .data = &match_data_kryo },
|
2020-01-26 03:29:56 +00:00
|
|
|
{ .compatible = "qcom,qcs404", .data = &match_data_qcs404 },
|
2020-01-26 03:47:49 +00:00
|
|
|
+ { .compatible = "qcom,ipq8064", .data = &match_data_krait },
|
|
|
|
+ { .compatible = "qcom,apq8064", .data = &match_data_krait },
|
|
|
|
+ { .compatible = "qcom,msm8974", .data = &match_data_krait },
|
|
|
|
+ { .compatible = "qcom,msm8960", .data = &match_data_krait },
|
|
|
|
{},
|
|
|
|
};
|
2020-12-31 18:25:45 +00:00
|
|
|
MODULE_DEVICE_TABLE(of, qcom_cpufreq_match_list);
|