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: I11422e151fb87feae328548572adcf7892bb085f Signed-off-by: Jai Kumar Gautam <quic_jgautam@quicinc.com>
This commit is contained in:
committed by
JAI KUMAR GAUTAM
parent
2c4c2c08ad
commit
87f706e1d7
@@ -29,6 +29,7 @@ static const char * const dcvs_hw_names[NUM_DCVS_HW_TYPES] = {
|
||||
[DCVS_LLCC] = "LLCC",
|
||||
[DCVS_L3] = "L3",
|
||||
[DCVS_DDRQOS] = "DDRQOS",
|
||||
[DCVS_L3_1] = "L3_1",
|
||||
};
|
||||
|
||||
enum dcvs_type {
|
||||
@@ -699,7 +700,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);
|
||||
@@ -769,7 +770,7 @@ static int qcom_dcvs_path_probe(struct platform_device *pdev)
|
||||
if (hw->type == DCVS_DDR || hw->type == DCVS_LLCC
|
||||
|| hw->type == DCVS_DDRQOS)
|
||||
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);
|
||||
@@ -788,7 +789,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;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "qcom-dcvs-epss: " fmt
|
||||
@@ -121,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 {
|
||||
|
||||
@@ -17,6 +17,7 @@ enum dcvs_hw_type {
|
||||
DCVS_LLCC,
|
||||
DCVS_L3,
|
||||
DCVS_DDRQOS,
|
||||
DCVS_L3_1,
|
||||
NUM_DCVS_HW_TYPES
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user