Add LLCC support for SC7180
cover Add LLCC support for SC7180
LLCC behaviour is controlled by the configuration data set in the llcc-qcom driver, add the same for SC7180 SoC. Also add the compatible for SC7180.
The patch is based on linux-next where llcc driver has been made generic and not sdm845 specific.
Sai Prakash Ranjan (1):
dt-bindings: msm: Add LLCC for SC7180
Vivek Gautam (1):
soc: qcom: llcc: Add configuration data for SC7180
.../devicetree/bindings/arm/msm/qcom,llcc.txt | 4 +++- drivers/soc/qcom/llcc-qcom.c | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-)
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH 1/2 soc: qcom: llcc: Add configuration data for SC7180
From: Vivek Gautam <[email protected]>
Add llcc configuration data for SC7180 SoC which controls llcc behaviour.
--- drivers/soc/qcom/llcc-qcom.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/soc/qcom/llcc-qcom.c +13 -0
@@ -91,6 +91,13 @@ struct qcom_llcc_config {int size; }; +static struct llcc_slice_config sc7180_data[] = { + {LLCC_CPUSS ,1 ,256 ,1 ,0 ,0xf ,0x0 ,0 ,0 ,0 ,1 ,1 }, + {LLCC_MDM ,8 ,128 ,1 ,0 ,0xf ,0x0 ,0 ,0 ,0 ,1 ,0 }, + {LLCC_GPUHTW ,11 ,128 ,1 ,0 ,0xf ,0x0 ,0 ,0 ,0 ,1 ,0 }, + {LLCC_GPU ,12 ,128 ,1 ,0 ,0xf ,0x0 ,0 ,0 ,0 ,1 ,0 }, +}; +static struct llcc_slice_config sdm845_data[] = { {LLCC_CPUSS ,1 ,2816 ,1 ,0 ,0xffc ,0x2 ,0 ,0 ,1 ,1 ,1 }, {LLCC_VIDSC0 ,2 ,512 ,2 ,1 ,0x0 ,0x0f0 ,0 ,0 ,1 ,1 ,0 },
@@ -112,6 +119,11 @@ static struct llcc_slice_config sdm845_data[] = { { LLCC_AUDHW, 22, 1024, 1, 1, 0xffc, 0x2, 0, 0, 1, 1, 0 }, }; +static const struct qcom_llcc_config sc7180_cfg = { + .sct_data = sc7180_data, + .size =ARRAY_SIZE (sc7180_data), +}; +static const struct qcom_llcc_config sdm845_cfg = { .sct_data = sdm845_data, .size = ARRAY_SIZE(sdm845_data),
@@ -485,6 +497,7 @@ static int qcom_llcc_probe(struct platform_device *pdev) }static const struct of_device_id qcom_llcc_of_match[] = { + { .compatible ="qcom,sc7180-llcc" , .data = &sc7180_cfg }, { .compatible ="qcom,sdm845-llcc" , .data = &sdm845_cfg }, { } };
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH 1/2] soc: qcom: llcc: Add configuration data for SC7180
Quoting Sai Prakash Ranjan (2019-10-18 06:57:08)
drivers/soc/qcom/llcc-qcom.c struct qcom_llcc_config { · line 94
Quoted 9 lines
drivers/soc/qcom/llcc-qcom.c +1
-0@@ -91,6 +91,13 @@ struct qcom_llcc_config {int size; }; +static struct llcc_slice_config sc7180_data[] = {
const?
drivers/soc/qcom/llcc-qcom.c struct qcom_llcc_config { · line 101
Quoted 7 lines
drivers/soc/qcom/llcc-qcom.c +6
-0+ { LLCC_CPUSS, 1, 256, 1, 0, 0xf, 0x0, 0, 0, 0, 1, 1 }, + { LLCC_MDM, 8, 128, 1, 0, 0xf, 0x0, 0, 0, 0, 1, 0 }, + { LLCC_GPUHTW, 11, 128, 1, 0, 0xf, 0x0, 0, 0, 0, 1, 0 }, + { LLCC_GPU, 12, 128, 1, 0, 0xf, 0x0, 0, 0, 0, 1, 0 }, +}; + static struct llcc_slice_config sdm845_data[] = {
This one should be const too I guess but it's not part of this patch.
Quoted 4 lines
drivers/soc/qcom/llcc-qcom.c +0
-0{ LLCC_CPUSS, 1, 2816, 1, 0, 0xffc, 0x2, 0, 0, 1, 1, 1 }, { LLCC_VIDSC0, 2, 512, 2, 1, 0x0, 0x0f0, 0, 0, 1, 1, 0 },@@ -112,6 +119,11 @@ static struct llcc_slice_config sdm845_data[] = { { LLCC_AUDHW, 22, 1024, 1, 1, 0xffc, 0x2, 0, 0, 1, 1, 0 },
drivers/soc/qcom/llcc-qcom.c static struct llcc_slice_config sdm845_data[] = { · line 129
Quoted 10 lines
drivers/soc/qcom/llcc-qcom.c +5
-0}; +static const struct qcom_llcc_config sc7180_cfg = { + .sct_data = sc7180_data, + .size =ARRAY_SIZE (sc7180_data), +}; +static const struct qcom_llcc_config sdm845_cfg = { .sct_data = sdm845_data, .size =ARRAY_SIZE (sdm845_data),
Otherwise looks OK to me.
Re: [PATCH 1/2] soc: qcom: llcc: Add configuration data for SC7180
Quoted 9 lines · Stephen Boyd
Quoting Sai Prakash Ranjan (2019-10-18 06:57:08)
Quoted 8 lines
drivers/soc/qcom/llcc-qcom.c +0
-0@@ -91,6 +91,13 @@ struct qcom_llcc_config {int size; };
Quoted 4 lines
drivers/soc/qcom/llcc-qcom.c struct qcom_llcc_config { · line 94
Quoted 1 line
drivers/soc/qcom/llcc-qcom.c +1
-0+static struct llcc_slice_config sc7180_data[] = {const?
Will do in next version.
Quoted 10 lines
drivers/soc/qcom/llcc-qcom.c struct qcom_llcc_config { · line 101
Quoted 7 lines
drivers/soc/qcom/llcc-qcom.c +6
-0+ { LLCC_CPUSS, 1, 256, 1, 0, 0xf, 0x0, 0, 0, 0, 1, 1 }, + { LLCC_MDM, 8, 128, 1, 0, 0xf, 0x0, 0, 0, 0, 1, 0 }, + { LLCC_GPUHTW, 11, 128, 1, 0, 0xf, 0x0, 0, 0, 0, 1, 0 }, + { LLCC_GPU, 12, 128, 1, 0, 0xf, 0x0, 0, 0, 0, 1, 0 }, +}; + static struct llcc_slice_config sdm845_data[] = {This one should be const too I guess but it's not part of this patch.
Will change this as well.
Quoted 20 lines
Quoted 16 lines
drivers/soc/qcom/llcc-qcom.c +0
-0{LLCC_CPUSS ,1 ,2816 ,1 ,0 ,0xffc ,0x2 ,0 ,0 ,1 ,1 ,1 },{ LLCC_VIDSC0, 2, 512, 2, 1, 0x0, 0x0f0, 0, 0, 1, 1, 0 },drivers/soc/qcom/llcc-qcom.c +5
-0@@ -112,6 +119,11 @@ static struct llcc_slice_config sdm845_data[] = { {LLCC_AUDHW ,22 ,1024 ,1 ,1 ,0xffc ,0x2 ,0 ,0 ,1 ,1 ,0 }, }; +static const struct qcom_llcc_config sc7180_cfg = { + .sct_data = sc7180_data, + .size =ARRAY_SIZE (sc7180_data), +}; + static const struct qcom_llcc_config sdm845_cfg = {Quoted 2 lines
.sct_data =
sdm845_data,
.size =ARRAY_SIZE(sdm845_data),Otherwise looks OK to me.
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
PATCH 2/2 dt-bindings: msm: Add LLCC for SC7180
In reply to Sai Prakash RanjanAdd LLCC compatible for SC7180 SoC.
--- Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt +3 -1
@@ -11,7 +11,9 @@ Properties: - compatible: Usage: required Value type: <string> - Definition: must be "qcom,sdm845-llcc" + Definition: must be one of: + "qcom,sc7180-llcc", + "qcom,sdm845-llcc" - reg: Usage: required
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Re: [PATCH 2/2] dt-bindings: msm: Add LLCC for SC7180
Quoting Sai Prakash Ranjan (2019-10-18 06:57:09)
Quoted 6 lines
Add LLCC compatible for SC7180 SoC.
Signed-off-by Sai Prakash Ranjan <[email protected]>--- Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Can you convert this binding to YAML? Would be useful to make sure it's used properly.
Quoted 14 lines
Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt +3
-1@@ -11,7 +11,9 @@ Properties: - compatible: Usage: required Value type: <string> - Definition: must be "qcom,sdm845-llcc" + Definition: must be one of: + "qcom,sc7180-llcc", + "qcom,sdm845-llcc"
Re: [PATCH 2/2] dt-bindings: msm: Add LLCC for SC7180
Quoted 11 lines · Stephen Boyd
Quoting Sai Prakash Ranjan (2019-10-18 06:57:09)
Quoted 6 lines
Add LLCC compatible for SC7180 SoC.
Signed-off-by Sai Prakash Ranjan <[email protected]>--- Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Can you convert this binding to YAML? Would be useful to make sure it's used properly.
Ok will do in next version.
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/arm/msm/qcom,llcc.txt +3
-1@@ -11,7 +11,9 @@ Properties: - compatible: Usage: required Value type: <string> - Definition: must be "qcom,sdm845-llcc" + Definition: must be one of: + "qcom,sc7180-llcc", + "qcom,sdm845-llcc"
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation