drivers: qcom: dcvs: Enable support for additional L3 instance

Some targets have an additional L3 instance, which will be scaled
independently. This change supports additional L3 instance with
the name L3_1, which is altogether a new DCVS HW type.

Change-Id: I4edd425f75d58cf64fe9237e517da7a11c9778a3
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
This commit is contained in:
Shreyas K K 2023-07-25 12:30:46 +05:30
parent bf01a58857
commit 5d7046e48c
3 changed files with 7 additions and 5 deletions

View File

@ -31,6 +31,7 @@ static const char * const dcvs_hw_names[NUM_DCVS_HW_TYPES] = {
[DCVS_L3] = "L3",
[DCVS_DDRQOS] = "DDRQOS",
[DCVS_UBWCP] = "UBWCP",
[DCVS_L3_1] = "L3_1",
};
enum dcvs_type {
@ -702,7 +703,7 @@ static int qcom_dcvs_hw_probe(struct platform_device *pdev)
return -ENODEV;
}
if (hw_type == DCVS_L3)
if (hw_type == DCVS_L3 || hw_type == DCVS_L3_1)
ret = populate_l3_table(dev, &hw->freq_table);
else
ret = populate_freq_table(dev, &hw->freq_table);
@ -773,7 +774,7 @@ static int qcom_dcvs_path_probe(struct platform_device *pdev)
|| hw->type == DCVS_DDRQOS
|| hw->type == DCVS_UBWCP)
ret = setup_icc_sp_device(dev, hw, path);
else if (hw->type == DCVS_L3)
else if (hw->type == DCVS_L3 || hw->type == DCVS_L3_1)
ret = setup_epss_l3_sp_device(dev, hw, path);
if (ret < 0) {
dev_err(dev, "Error setting up sp dev: %d\n", ret);
@ -792,7 +793,7 @@ static int qcom_dcvs_path_probe(struct platform_device *pdev)
}
break;
case DCVS_PERCPU_PATH:
if (hw->type != DCVS_L3) {
if (hw->type != DCVS_L3 && hw->type != DCVS_L3_1) {
dev_err(dev, "Unsupported HW for path: %d\n", ret);
return -EINVAL;
}

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
*/
#define pr_fmt(fmt) "qcom-dcvs-epss: " fmt
@ -122,7 +122,7 @@ static int commit_epss_l3(struct dcvs_path *path, struct dcvs_freq *freqs,
if (freqs->ib <= hw->freq_table[idx])
break;
if (hw->type == DCVS_L3) {
if (hw->type == DCVS_L3 || hw->type == DCVS_L3_1) {
if (shared)
offset = d->l3_shared_offset;
else {

View File

@ -19,6 +19,7 @@ enum dcvs_hw_type {
DCVS_L3,
DCVS_DDRQOS,
DCVS_UBWCP,
DCVS_L3_1,
NUM_DCVS_HW_TYPES
};