diff mbox series

[1/2] soc: qcom: llcc: Add configuration data for SC7180

Message ID d0fd71fbeff6cd040335846cb65e125a89412d43.1571406041.git.saiprakash.ranjan@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series Add LLCC support for SC7180 | expand

Commit Message

Sai Prakash Ranjan Oct. 18, 2019, 1:57 p.m. UTC
From: Vivek Gautam <vivek.gautam@codeaurora.org>

Add llcc configuration data for SC7180 SoC which controls
llcc behaviour.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
---
 drivers/soc/qcom/llcc-qcom.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Stephen Boyd Oct. 18, 2019, 2:31 p.m. UTC | #1
Quoting Sai Prakash Ranjan (2019-10-18 06:57:08)
> diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
> index 4bd982a294ce..4acb52f8536b 100644
> --- a/drivers/soc/qcom/llcc-qcom.c
> +++ b/drivers/soc/qcom/llcc-qcom.c
> @@ -91,6 +91,13 @@ struct qcom_llcc_config {
>         int size;
>  };
>  
> +static struct llcc_slice_config sc7180_data[] =  {

const?

> +       { 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.

>         { 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),

Otherwise looks OK to me.
Sai Prakash Ranjan Oct. 18, 2019, 3:25 p.m. UTC | #2
On 2019-10-18 20:01, Stephen Boyd wrote:
> Quoting Sai Prakash Ranjan (2019-10-18 06:57:08)
>> diff --git a/drivers/soc/qcom/llcc-qcom.c 
>> b/drivers/soc/qcom/llcc-qcom.c
>> index 4bd982a294ce..4acb52f8536b 100644
>> --- a/drivers/soc/qcom/llcc-qcom.c
>> +++ b/drivers/soc/qcom/llcc-qcom.c
>> @@ -91,6 +91,13 @@ struct qcom_llcc_config {
>>         int size;
>>  };
>> 
>> +static struct llcc_slice_config sc7180_data[] =  {
> 
> const?
> 

Will do in next version.

>> +       { 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.

>>         { 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),
> 
> Otherwise looks OK to me.
diff mbox series

Patch

diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
index 4bd982a294ce..4acb52f8536b 100644
--- a/drivers/soc/qcom/llcc-qcom.c
+++ b/drivers/soc/qcom/llcc-qcom.c
@@ -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 },
 	{ }
 };