linux-remoteproc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] remoteproc: qcom: pas: Support SDM845 SLPI
@ 2023-03-27 18:37 Dylan Van Assche
  2023-03-27 18:37 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas compatible Dylan Van Assche
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dylan Van Assche @ 2023-03-27 18:37 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski
  Cc: Konrad Dybcio, Manivannan Sadhasivam, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel, Dylan Van Assche

* About *

The Qualcomm SDM845 SoC has a separate SLPI (Sensor Low Power Island)
DSP for sensors connected to the SoC which is responsible for exposing
sensors to userspace, power saving, and other features. 
While sensors are connected to GPIOs of the SoC, they cannot be used
because the hypervisor blocks direct access to the sensors, thus the 
DSP must be used to access any sensor on this SoC. The SLPI DSP uses a
GLink edge (dsps) to communicate with the host and has a FastRPC interface
to load files from the host filesystem such as sensor configuration files.
The FastRPC interface does not use regular FastRPC Compute Banks
but instead uses an allocated CMA region through which communication happens.

* Changes *

This patchseries adds support for this remoteproc in the q6v5_pas driver
to allow booting the SLPI on the SDM845 and expose its service 400 over QRTR.

* Related patches *

Support for the FastRPC side of the SLPI and DTS changes are submitted 
in separate series. These are the links to v1 of the series:

1. FastRPC changes:
https://lore.kernel.org/linux-arm-msm/20230325134410.21092-1-me@dylanvanassche.be/
2. DTS changes:
https://lore.kernel.org/linux-devicetree/20230325135114.21688-1-me@dylanvanassche.be/

* Changelog *

Changes in v2:

- Removed double blank lines
- Added power-domain if:then: for SDM845 SLPI
- After adding SDM845 SLPI, refactor SLPI resource init

Kind regards,
Dylan Van Assche

Dylan Van Assche (3):
  dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas
    compatible
  remoteproc: qcom: pas: add SDM845 SLPI resource
  remoteproc: qcom: pas: refactor SLPI remoteproc init

 .../bindings/remoteproc/qcom,adsp.yaml        | 19 +++++++
 drivers/remoteproc/qcom_q6v5_pas.c            | 49 ++++---------------
 2 files changed, 28 insertions(+), 40 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 1/3] dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas compatible
  2023-03-27 18:37 [PATCH v2 0/3] remoteproc: qcom: pas: Support SDM845 SLPI Dylan Van Assche
@ 2023-03-27 18:37 ` Dylan Van Assche
  2023-03-28  6:40   ` Krzysztof Kozlowski
  2023-03-27 18:37 ` [PATCH v2 2/3] remoteproc: qcom: pas: add SDM845 SLPI resource Dylan Van Assche
  2023-03-27 18:37 ` [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init Dylan Van Assche
  2 siblings, 1 reply; 8+ messages in thread
From: Dylan Van Assche @ 2023-03-27 18:37 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski
  Cc: Konrad Dybcio, Manivannan Sadhasivam, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel, Dylan Van Assche

SLPI DSP remoteproc on DSP is defined by the 'qcom,sdm845-slpi-pas'
compatible in the qcom_q6v5_pas driver. Add this compatible to the
devicetree bindings.

Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
 .../bindings/remoteproc/qcom,adsp.yaml        | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
index 643ee787a81f..eb4a440a661a 100644
--- a/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
@@ -26,6 +26,7 @@ properties:
       - qcom,sdm660-adsp-pas
       - qcom,sdm845-adsp-pas
       - qcom,sdm845-cdsp-pas
+      - qcom,sdm845-slpi-pas
 
   reg:
     maxItems: 1
@@ -63,6 +64,7 @@ allOf:
               - qcom,msm8998-adsp-pas
               - qcom,sdm845-adsp-pas
               - qcom,sdm845-cdsp-pas
+              - qcom,sdm845-slpi-pas
     then:
       properties:
         clocks:
@@ -104,6 +106,7 @@ allOf:
               - qcom,msm8998-slpi-pas
               - qcom,sdm845-adsp-pas
               - qcom,sdm845-cdsp-pas
+              - qcom,sdm845-slpi-pas
     then:
       properties:
         interrupts:
@@ -157,6 +160,22 @@ allOf:
       required:
         - px-supply
 
+  - if:
+      properties:
+        compatible:
+          enum:
+            - qcom,sdm845-slpi-pas
+    then:
+      properties:
+        power-domains:
+          items:
+            - description: LCX power domain
+            - description: LMX power domain
+        power-domain-names:
+          items:
+            - const: lcx
+            - const: lmx
+
   - if:
       properties:
         compatible:
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/3] remoteproc: qcom: pas: add SDM845 SLPI resource
  2023-03-27 18:37 [PATCH v2 0/3] remoteproc: qcom: pas: Support SDM845 SLPI Dylan Van Assche
  2023-03-27 18:37 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas compatible Dylan Van Assche
@ 2023-03-27 18:37 ` Dylan Van Assche
  2023-03-28  8:26   ` Konrad Dybcio
  2023-03-27 18:37 ` [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init Dylan Van Assche
  2 siblings, 1 reply; 8+ messages in thread
From: Dylan Van Assche @ 2023-03-27 18:37 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski
  Cc: Konrad Dybcio, Manivannan Sadhasivam, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel, Dylan Van Assche

Add SLPI resources for the SDM845 Qualcomm SoC to the Qualcomm
remoteproc q6v5_pas driver to define the default firmware name
and GLink edge name.

Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index c99a20542685..d82b6f4bced4 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -1028,6 +1028,22 @@ static const struct adsp_data slpi_resource_init = {
 		.ssctl_id = 0x16,
 };
 
+static const struct adsp_data sdm845_slpi_resource = {
+		.crash_reason_smem = 424,
+		.firmware_name = "slpi.mdt",
+		.pas_id = 12,
+		.auto_boot = true,
+		.proxy_pd_names = (char*[]){
+			"lcx",
+			"lmx",
+			NULL
+		},
+		.load_state = "slpi",
+		.ssr_name = "dsps",
+		.sysmon_name = "slpi",
+		.ssctl_id = 0x16,
+};
+
 static const struct adsp_data sm8150_slpi_resource = {
 		.crash_reason_smem = 424,
 		.firmware_name = "slpi.mdt",
@@ -1201,6 +1217,7 @@ static const struct of_device_id adsp_of_match[] = {
 	{ .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init},
 	{ .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init},
 	{ .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init},
+	{ .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource},
 	{ .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource},
 	{ .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init},
 	{ .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init
  2023-03-27 18:37 [PATCH v2 0/3] remoteproc: qcom: pas: Support SDM845 SLPI Dylan Van Assche
  2023-03-27 18:37 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas compatible Dylan Van Assche
  2023-03-27 18:37 ` [PATCH v2 2/3] remoteproc: qcom: pas: add SDM845 SLPI resource Dylan Van Assche
@ 2023-03-27 18:37 ` Dylan Van Assche
  2023-03-28  6:41   ` Krzysztof Kozlowski
  2023-03-28  8:26   ` Konrad Dybcio
  2 siblings, 2 replies; 8+ messages in thread
From: Dylan Van Assche @ 2023-03-27 18:37 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski
  Cc: Konrad Dybcio, Manivannan Sadhasivam, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel, Dylan Van Assche

SLPI remoteproc initialization is the same for SDM845, SM8150, SM8250,
SM8350 but is duplicated for each compatible. Refactor initialization
structs for these 4 compatibles as a single struct.

Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 66 ++++--------------------------
 1 file changed, 9 insertions(+), 57 deletions(-)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index d82b6f4bced4..d1c7baec4aca 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -1014,7 +1014,7 @@ static const struct adsp_data sc8180x_mpss_resource = {
 	.ssctl_id = 0x12,
 };
 
-static const struct adsp_data slpi_resource_init = {
+static const struct adsp_data msm_slpi_resource_init = {
 		.crash_reason_smem = 424,
 		.firmware_name = "slpi.mdt",
 		.pas_id = 12,
@@ -1028,7 +1028,7 @@ static const struct adsp_data slpi_resource_init = {
 		.ssctl_id = 0x16,
 };
 
-static const struct adsp_data sdm845_slpi_resource = {
+static const struct adsp_data sm_slpi_resource_init = {
 		.crash_reason_smem = 424,
 		.firmware_name = "slpi.mdt",
 		.pas_id = 12,
@@ -1044,54 +1044,6 @@ static const struct adsp_data sdm845_slpi_resource = {
 		.ssctl_id = 0x16,
 };
 
-static const struct adsp_data sm8150_slpi_resource = {
-		.crash_reason_smem = 424,
-		.firmware_name = "slpi.mdt",
-		.pas_id = 12,
-		.auto_boot = true,
-		.proxy_pd_names = (char*[]){
-			"lcx",
-			"lmx",
-			NULL
-		},
-		.load_state = "slpi",
-		.ssr_name = "dsps",
-		.sysmon_name = "slpi",
-		.ssctl_id = 0x16,
-};
-
-static const struct adsp_data sm8250_slpi_resource = {
-	.crash_reason_smem = 424,
-	.firmware_name = "slpi.mdt",
-	.pas_id = 12,
-	.auto_boot = true,
-	.proxy_pd_names = (char*[]){
-		"lcx",
-		"lmx",
-		NULL
-	},
-	.load_state = "slpi",
-	.ssr_name = "dsps",
-	.sysmon_name = "slpi",
-	.ssctl_id = 0x16,
-};
-
-static const struct adsp_data sm8350_slpi_resource = {
-	.crash_reason_smem = 424,
-	.firmware_name = "slpi.mdt",
-	.pas_id = 12,
-	.auto_boot = true,
-	.proxy_pd_names = (char*[]){
-		"lcx",
-		"lmx",
-		NULL
-	},
-	.load_state = "slpi",
-	.ssr_name = "dsps",
-	.sysmon_name = "slpi",
-	.ssctl_id = 0x16,
-};
-
 static const struct adsp_data wcss_resource_init = {
 	.crash_reason_smem = 421,
 	.firmware_name = "wcnss.mdt",
@@ -1200,9 +1152,9 @@ static const struct of_device_id adsp_of_match[] = {
 	{ .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource},
 	{ .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
 	{ .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource},
-	{ .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init},
+	{ .compatible = "qcom,msm8996-slpi-pil", .data = &msm_slpi_resource_init},
 	{ .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource},
-	{ .compatible = "qcom,msm8998-slpi-pas", .data = &slpi_resource_init},
+	{ .compatible = "qcom,msm8998-slpi-pas", .data = &msm_slpi_resource_init},
 	{ .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init },
 	{ .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init },
 	{ .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },
@@ -1217,7 +1169,7 @@ static const struct of_device_id adsp_of_match[] = {
 	{ .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init},
 	{ .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init},
 	{ .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init},
-	{ .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource},
+	{ .compatible = "qcom,sdm845-slpi-pas", .data = &sm_slpi_resource_init},
 	{ .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource},
 	{ .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init},
 	{ .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init},
@@ -1228,17 +1180,17 @@ static const struct of_device_id adsp_of_match[] = {
 	{ .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource},
 	{ .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource},
 	{ .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init},
-	{ .compatible = "qcom,sm8150-slpi-pas", .data = &sm8150_slpi_resource},
+	{ .compatible = "qcom,sm8150-slpi-pas", .data = &sm_slpi_resource_init},
 	{ .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource},
 	{ .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource},
-	{ .compatible = "qcom,sm8250-slpi-pas", .data = &sm8250_slpi_resource},
+	{ .compatible = "qcom,sm8250-slpi-pas", .data = &sm_slpi_resource_init},
 	{ .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource},
 	{ .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource},
-	{ .compatible = "qcom,sm8350-slpi-pas", .data = &sm8350_slpi_resource},
+	{ .compatible = "qcom,sm8350-slpi-pas", .data = &sm_slpi_resource_init},
 	{ .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init},
 	{ .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource},
 	{ .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource},
-	{ .compatible = "qcom,sm8450-slpi-pas", .data = &sm8350_slpi_resource},
+	{ .compatible = "qcom,sm8450-slpi-pas", .data = &sm_slpi_resource_init},
 	{ .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource},
 	{ .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource},
 	{ .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource},
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas compatible
  2023-03-27 18:37 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas compatible Dylan Van Assche
@ 2023-03-28  6:40   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-28  6:40 UTC (permalink / raw)
  To: Dylan Van Assche, Andy Gross, Bjorn Andersson, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski
  Cc: Konrad Dybcio, Manivannan Sadhasivam, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel

On 27/03/2023 20:37, Dylan Van Assche wrote:
> SLPI DSP remoteproc on DSP is defined by the 'qcom,sdm845-slpi-pas'
> compatible in the qcom_q6v5_pas driver. Add this compatible to the
> devicetree bindings.
> 
> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
> ---
>  .../bindings/remoteproc/qcom,adsp.yaml        | 19 +++++++++++++++++++


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init
  2023-03-27 18:37 ` [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init Dylan Van Assche
@ 2023-03-28  6:41   ` Krzysztof Kozlowski
  2023-03-28  8:26   ` Konrad Dybcio
  1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-03-28  6:41 UTC (permalink / raw)
  To: Dylan Van Assche, Andy Gross, Bjorn Andersson, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski
  Cc: Konrad Dybcio, Manivannan Sadhasivam, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel

On 27/03/2023 20:37, Dylan Van Assche wrote:
> SLPI remoteproc initialization is the same for SDM845, SM8150, SM8250,
> SM8350 but is duplicated for each compatible. Refactor initialization
> structs for these 4 compatibles as a single struct.
> 
> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
> ---
>  drivers/remoteproc/qcom_q6v5_pas.c | 66 ++++--------------------------
>  1 file changed, 9 insertions(+), 57 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index d82b6f4bced4..d1c7baec4aca 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -1014,7 +1014,7 @@ static const struct adsp_data sc8180x_mpss_resource = {
>  	.ssctl_id = 0x12,
>  };
>  
> -static const struct adsp_data slpi_resource_init = {
> +static const struct adsp_data msm_slpi_resource_init = {
>  		.crash_reason_smem = 424,
>  		.firmware_name = "slpi.mdt",
>  		.pas_id = 12,
> @@ -1028,7 +1028,7 @@ static const struct adsp_data slpi_resource_init = {
>  		.ssctl_id = 0x16,
>  };
>  
> -static const struct adsp_data sdm845_slpi_resource = {
> +static const struct adsp_data sm_slpi_resource_init = {

You just added this and further lines. First refactor, then add new
device support.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init
  2023-03-27 18:37 ` [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init Dylan Van Assche
  2023-03-28  6:41   ` Krzysztof Kozlowski
@ 2023-03-28  8:26   ` Konrad Dybcio
  1 sibling, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2023-03-28  8:26 UTC (permalink / raw)
  To: Dylan Van Assche, Andy Gross, Bjorn Andersson, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski
  Cc: Manivannan Sadhasivam, linux-arm-msm, linux-remoteproc,
	devicetree, linux-kernel



On 27.03.2023 20:37, Dylan Van Assche wrote:
> SLPI remoteproc initialization is the same for SDM845, SM8150, SM8250,
> SM8350 but is duplicated for each compatible. Refactor initialization
> structs for these 4 compatibles as a single struct.
> 
> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
> ---
>  drivers/remoteproc/qcom_q6v5_pas.c | 66 ++++--------------------------
>  1 file changed, 9 insertions(+), 57 deletions(-)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index d82b6f4bced4..d1c7baec4aca 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -1014,7 +1014,7 @@ static const struct adsp_data sc8180x_mpss_resource = {
>  	.ssctl_id = 0x12,
>  };
>  
> -static const struct adsp_data slpi_resource_init = {
> +static const struct adsp_data msm_slpi_resource_init = {
Clever idea, but I think naming it after the first SoC it was
used on (msm8996) will be clearer, e.g. msm8960 doesn't have SLPI.

>  		.crash_reason_smem = 424,
>  		.firmware_name = "slpi.mdt",
>  		.pas_id = 12,
> @@ -1028,7 +1028,7 @@ static const struct adsp_data slpi_resource_init = {
>  		.ssctl_id = 0x16,
>  };
>  
> -static const struct adsp_data sdm845_slpi_resource = {
> +static const struct adsp_data sm_slpi_resource_init = {
And similarly here, the sdm845 name can stay.

Konrad
>  		.crash_reason_smem = 424,
>  		.firmware_name = "slpi.mdt",
>  		.pas_id = 12,
> @@ -1044,54 +1044,6 @@ static const struct adsp_data sdm845_slpi_resource = {
>  		.ssctl_id = 0x16,
>  };
>  
> -static const struct adsp_data sm8150_slpi_resource = {
> -		.crash_reason_smem = 424,
> -		.firmware_name = "slpi.mdt",
> -		.pas_id = 12,
> -		.auto_boot = true,
> -		.proxy_pd_names = (char*[]){
> -			"lcx",
> -			"lmx",
> -			NULL
> -		},
> -		.load_state = "slpi",
> -		.ssr_name = "dsps",
> -		.sysmon_name = "slpi",
> -		.ssctl_id = 0x16,
> -};
> -
> -static const struct adsp_data sm8250_slpi_resource = {
> -	.crash_reason_smem = 424,
> -	.firmware_name = "slpi.mdt",
> -	.pas_id = 12,
> -	.auto_boot = true,
> -	.proxy_pd_names = (char*[]){
> -		"lcx",
> -		"lmx",
> -		NULL
> -	},
> -	.load_state = "slpi",
> -	.ssr_name = "dsps",
> -	.sysmon_name = "slpi",
> -	.ssctl_id = 0x16,
> -};
> -
> -static const struct adsp_data sm8350_slpi_resource = {
> -	.crash_reason_smem = 424,
> -	.firmware_name = "slpi.mdt",
> -	.pas_id = 12,
> -	.auto_boot = true,
> -	.proxy_pd_names = (char*[]){
> -		"lcx",
> -		"lmx",
> -		NULL
> -	},
> -	.load_state = "slpi",
> -	.ssr_name = "dsps",
> -	.sysmon_name = "slpi",
> -	.ssctl_id = 0x16,
> -};
> -
>  static const struct adsp_data wcss_resource_init = {
>  	.crash_reason_smem = 421,
>  	.firmware_name = "wcnss.mdt",
> @@ -1200,9 +1152,9 @@ static const struct of_device_id adsp_of_match[] = {
>  	{ .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource},
>  	{ .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
>  	{ .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource},
> -	{ .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init},
> +	{ .compatible = "qcom,msm8996-slpi-pil", .data = &msm_slpi_resource_init},
>  	{ .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource},
> -	{ .compatible = "qcom,msm8998-slpi-pas", .data = &slpi_resource_init},
> +	{ .compatible = "qcom,msm8998-slpi-pas", .data = &msm_slpi_resource_init},
>  	{ .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init },
>  	{ .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init },
>  	{ .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },
> @@ -1217,7 +1169,7 @@ static const struct of_device_id adsp_of_match[] = {
>  	{ .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init},
>  	{ .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init},
>  	{ .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init},
> -	{ .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource},
> +	{ .compatible = "qcom,sdm845-slpi-pas", .data = &sm_slpi_resource_init},
>  	{ .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource},
>  	{ .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init},
>  	{ .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init},
> @@ -1228,17 +1180,17 @@ static const struct of_device_id adsp_of_match[] = {
>  	{ .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource},
>  	{ .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource},
>  	{ .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init},
> -	{ .compatible = "qcom,sm8150-slpi-pas", .data = &sm8150_slpi_resource},
> +	{ .compatible = "qcom,sm8150-slpi-pas", .data = &sm_slpi_resource_init},
>  	{ .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource},
>  	{ .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource},
> -	{ .compatible = "qcom,sm8250-slpi-pas", .data = &sm8250_slpi_resource},
> +	{ .compatible = "qcom,sm8250-slpi-pas", .data = &sm_slpi_resource_init},
>  	{ .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource},
>  	{ .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource},
> -	{ .compatible = "qcom,sm8350-slpi-pas", .data = &sm8350_slpi_resource},
> +	{ .compatible = "qcom,sm8350-slpi-pas", .data = &sm_slpi_resource_init},
>  	{ .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init},
>  	{ .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource},
>  	{ .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource},
> -	{ .compatible = "qcom,sm8450-slpi-pas", .data = &sm8350_slpi_resource},
> +	{ .compatible = "qcom,sm8450-slpi-pas", .data = &sm_slpi_resource_init},
>  	{ .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource},
>  	{ .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource},
>  	{ .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource},

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2 2/3] remoteproc: qcom: pas: add SDM845 SLPI resource
  2023-03-27 18:37 ` [PATCH v2 2/3] remoteproc: qcom: pas: add SDM845 SLPI resource Dylan Van Assche
@ 2023-03-28  8:26   ` Konrad Dybcio
  0 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2023-03-28  8:26 UTC (permalink / raw)
  To: Dylan Van Assche, Andy Gross, Bjorn Andersson, Mathieu Poirier,
	Rob Herring, Krzysztof Kozlowski
  Cc: Manivannan Sadhasivam, linux-arm-msm, linux-remoteproc,
	devicetree, linux-kernel



On 27.03.2023 20:37, Dylan Van Assche wrote:
> Add SLPI resources for the SDM845 Qualcomm SoC to the Qualcomm
> remoteproc q6v5_pas driver to define the default firmware name
> and GLink edge name.
> 
> Signed-off-by: Dylan Van Assche <me@dylanvanassche.be>
> ---
>  drivers/remoteproc/qcom_q6v5_pas.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index c99a20542685..d82b6f4bced4 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -1028,6 +1028,22 @@ static const struct adsp_data slpi_resource_init = {
>  		.ssctl_id = 0x16,
>  };
>  
> +static const struct adsp_data sdm845_slpi_resource = {
> +		.crash_reason_smem = 424,
> +		.firmware_name = "slpi.mdt",
> +		.pas_id = 12,
> +		.auto_boot = true,
> +		.proxy_pd_names = (char*[]){
> +			"lcx",
> +			"lmx",
> +			NULL
> +		},
> +		.load_state = "slpi",
> +		.ssr_name = "dsps",
> +		.sysmon_name = "slpi",
> +		.ssctl_id = 0x16,
> +};
Not sure why you're adding this just to remove it in the next
patch. You can just assign a different one here and then clean
it up for all others.

Konrad
> +
>  static const struct adsp_data sm8150_slpi_resource = {
>  		.crash_reason_smem = 424,
>  		.firmware_name = "slpi.mdt",
> @@ -1201,6 +1217,7 @@ static const struct of_device_id adsp_of_match[] = {
>  	{ .compatible = "qcom,sdm660-adsp-pas", .data = &adsp_resource_init},
>  	{ .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init},
>  	{ .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init},
> +	{ .compatible = "qcom,sdm845-slpi-pas", .data = &sdm845_slpi_resource},
>  	{ .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource},
>  	{ .compatible = "qcom,sm6115-adsp-pas", .data = &adsp_resource_init},
>  	{ .compatible = "qcom,sm6115-cdsp-pas", .data = &cdsp_resource_init},

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-28  8:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 18:37 [PATCH v2 0/3] remoteproc: qcom: pas: Support SDM845 SLPI Dylan Van Assche
2023-03-27 18:37 ` [PATCH v2 1/3] dt-bindings: remoteproc: qcom: adsp: add qcom,sdm845-slpi-pas compatible Dylan Van Assche
2023-03-28  6:40   ` Krzysztof Kozlowski
2023-03-27 18:37 ` [PATCH v2 2/3] remoteproc: qcom: pas: add SDM845 SLPI resource Dylan Van Assche
2023-03-28  8:26   ` Konrad Dybcio
2023-03-27 18:37 ` [PATCH v2 3/3] remoteproc: qcom: pas: refactor SLPI remoteproc init Dylan Van Assche
2023-03-28  6:41   ` Krzysztof Kozlowski
2023-03-28  8:26   ` Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).