Linux-remoteproc Archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4]remoteproc: qcom_q6v5_pas: Add support for QDU1000/QRU1000 mpss
@ 2024-06-20 12:01 Komal Bajaj
  2024-06-20 12:01 ` [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices Komal Bajaj
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Komal Bajaj @ 2024-06-20 12:01 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Melody Olvera, Komal Bajaj

This patchset adds support for the mpss found in the QDU1000 and QRU1000
SoCs.

The mpss boot process now supports late attach for an already running
mpss. For this, it uses an RMB register space to perform a handshake
with the mpss for the late attach process. This is implemented in the
patches below. The patches also address issues with split binary
detection to support loading of split binaries more robustly.

Changes from v2:
* Collected Acked-by tag
* Listed the items in reg property in qdu1000-mpss-pas bindings
* Marked memory-region as required property
* Moved rmb register logic to pas driver
* Moved the logic to signal Q6 to continute booting into a helper
  function
* Link to v2: https://lore.kernel.org/linux-arm-msm/20230306231202.12223-1-quic_molvera@quicinc.com/

Changes from v1:
* Dropped changes to aoss-qmp
* Renamed mpss pas bindings
* Updated commit msg on mdt loader to be more descriptive
* Fixed syntax errors in bindings
* Updated firmware name in bindings

Komal Bajaj (1):
  remoteproc: qcom_q6v5_pas: Add QDU1000/QRU1000 mpss compatible

Melody Olvera (3):
  dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices
  remoteproc: qcom: q6v5: Add support for q6 rmb registers
  remoteproc: qcom_q6v5_pas: Add support to attach a DSP

 .../remoteproc/qcom,qdu1000-mpss-pas.yaml     | 129 ++++++++++++++++++
 drivers/remoteproc/qcom_q6v5.h                |   8 ++
 drivers/remoteproc/qcom_q6v5_pas.c            | 107 +++++++++++++++
 3 files changed, 244 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml

--
2.42.0


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

* [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices
  2024-06-20 12:01 [PATCH v3 0/4]remoteproc: qcom_q6v5_pas: Add support for QDU1000/QRU1000 mpss Komal Bajaj
@ 2024-06-20 12:01 ` Komal Bajaj
  2024-06-20 13:20   ` Krzysztof Kozlowski
  2024-06-20 13:45   ` Rob Herring (Arm)
  2024-06-20 12:01 ` [PATCH v3 2/4] remoteproc: qcom: q6v5: Add support for q6 rmb registers Komal Bajaj
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Komal Bajaj @ 2024-06-20 12:01 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Melody Olvera, Komal Bajaj

From: Melody Olvera <quic_molvera@quicinc.com>

Document the compatible for the component used to boot the MPSS on the
QDU1000 and QRU1000 SoCs.

The QDU1000 and QRU1000 mpss boot process now requires the specification
of an RMB register space to complete the handshake needed to start or
attach the mpss.

Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
---
 .../remoteproc/qcom,qdu1000-mpss-pas.yaml     | 129 ++++++++++++++++++
 1 file changed, 129 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml

diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml
new file mode 100644
index 000000000000..71c5a85b679e
--- /dev/null
+++ b/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml
@@ -0,0 +1,129 @@
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/remoteproc/qcom,qdu1000-mpss-pas.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm QDU1000 Modem Peripheral Authentication Service
+
+maintainers:
+  - Melody Olvera <quic_molvera@quicinc.com>
+  - Komal Bajaj <quic_kbajaj@quicinc.com>
+
+description:
+  Qualcomm QDU1000 SoC Peripheral Authentication Service loads and boots firmware
+  on the Qualcomm DSP Hexagon core.
+
+properties:
+  compatible:
+    enum:
+      - qcom,qdu1000-mpss-pas
+
+  reg:
+    items:
+      - description: Address offset and size for MPSS PAS register set
+      - description: Address offset and size for MPSS RMB register set
+
+  reg-names:
+    items:
+      - const: base
+      - const: rmb
+
+  clocks:
+    items:
+      - description: XO clock
+
+  clock-names:
+    items:
+      - const: xo
+
+  qcom,qmp:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: Reference to the AOSS side-channel message RAM.
+
+  smd-edge: false
+
+  firmware-name:
+    items:
+      - description: Firmware name of the Hexagon core
+      - description: Firmware name of the Hexagon Devicetree
+
+  memory-region:
+    items:
+      - description: Memory region for main Firmware authentication
+      - description: Memory region for Devicetree Firmware authentication
+      - description: DSM Memory region
+
+  power-domains:
+    items:
+      - description: CX power domain
+      - description: MSS power domain
+
+  power-domain-names:
+    items:
+      - const: cx
+      - const: mss
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - memory-region
+
+allOf:
+  - $ref: /schemas/remoteproc/qcom,pas-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    #include <dt-bindings/interconnect/qcom,qdu1000-rpmh.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    #include <dt-bindings/mailbox/qcom-ipcc.h>
+    #include <dt-bindings/power/qcom-rpmpd.h>
+
+    remoteproc@4080000 {
+        compatible = "qcom,qdu1000-mpss-pas";
+        reg = <0x4080000 0x4040>,
+              <0x4180000 0x1000>;
+        reg-names = "base", "rmb";
+
+        clocks = <&rpmhcc RPMH_CXO_CLK>;
+        clock-names = "xo";
+
+        interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_modem_in 1 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_modem_in 2 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_modem_in 3 IRQ_TYPE_EDGE_RISING>,
+                              <&smp2p_modem_in 7 IRQ_TYPE_EDGE_RISING>;
+        interrupt-names = "wdog", "fatal", "ready", "handover",
+                          "stop-ack", "shutdown-ack";
+
+        memory-region = <&mpss_mem>, <&dtb_mpss_mem>, <&mpss_dsm_mem>;
+
+        firmware-name = "qcom/qdu1000/modem.mbn",
+                        "qcom/qdu1000/modem_dtb.mbn";
+
+        power-domains = <&rpmhpd QDU1000_CX>,
+                        <&rpmhpd QDU1000_MSS>;
+        power-domain-names = "cx", "mss";
+
+        interconnects = <&mc_virt MASTER_LLCC &mc_virt SLAVE_EBI1>;
+
+        qcom,qmp = <&aoss_qmp>;
+
+        qcom,smem-states = <&smp2p_adsp_out 0>;
+        qcom,smem-state-names = "stop";
+
+        glink-edge {
+            interrupts-extended = <&ipcc IPCC_CLIENT_MPSS
+                                         IPCC_MPROC_SIGNAL_GLINK_QMP
+                                         IRQ_TYPE_EDGE_RISING>;
+            mboxes = <&ipcc IPCC_CLIENT_MPSS IPCC_MPROC_SIGNAL_GLINK_QMP>;
+
+            label = "modem";
+            qcom,remote-pid = <2>;
+        };
--
2.42.0


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

* [PATCH v3 2/4] remoteproc: qcom: q6v5: Add support for q6 rmb registers
  2024-06-20 12:01 [PATCH v3 0/4]remoteproc: qcom_q6v5_pas: Add support for QDU1000/QRU1000 mpss Komal Bajaj
  2024-06-20 12:01 ` [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices Komal Bajaj
@ 2024-06-20 12:01 ` Komal Bajaj
  2024-06-20 21:38   ` Dmitry Baryshkov
  2024-06-20 12:01 ` [PATCH v3 3/4] remoteproc: qcom_q6v5_pas: Add support to attach a DSP Komal Bajaj
  2024-06-20 12:01 ` [PATCH v3 4/4] remoteproc: qcom_q6v5_pas: Add QDU1000/QRU1000 mpss compatible Komal Bajaj
  3 siblings, 1 reply; 10+ messages in thread
From: Komal Bajaj @ 2024-06-20 12:01 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Melody Olvera, Komal Bajaj

From: Melody Olvera <quic_molvera@quicinc.com>

When attaching a running Q6, the remoteproc driver needs a way
to communicate with the Q6 using rmb registers, so allow the
rmb register to be gotten from the device tree if present.

Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
---
 drivers/remoteproc/qcom_q6v5.h     | 8 ++++++++
 drivers/remoteproc/qcom_q6v5_pas.c | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5.h b/drivers/remoteproc/qcom_q6v5.h
index 5a859c41896e..95824d5b64ce 100644
--- a/drivers/remoteproc/qcom_q6v5.h
+++ b/drivers/remoteproc/qcom_q6v5.h
@@ -7,6 +7,12 @@
 #include <linux/completion.h>
 #include <linux/soc/qcom/qcom_aoss.h>

+#define RMB_BOOT_WAIT_REG 0x8
+#define RMB_BOOT_CONT_REG 0xC
+#define RMB_Q6_BOOT_STATUS_REG 0x10
+
+#define RMB_POLL_MAX_TIMES 250
+
 struct icc_path;
 struct rproc;
 struct qcom_smem_state;
@@ -16,6 +22,8 @@ struct qcom_q6v5 {
 	struct device *dev;
 	struct rproc *rproc;

+	void __iomem *rmb_base;
+
 	struct qcom_smem_state *state;
 	struct qmp *qmp;

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 8458bcfe9e19..b9759f6b2283 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -770,6 +770,10 @@ static int adsp_probe(struct platform_device *pdev)
 		goto free_rproc;
 	adsp->proxy_pd_count = ret;

+	adsp->q6v5.rmb_base = devm_platform_ioremap_resource_byname(pdev, "rmb");
+	if (IS_ERR(adsp->q6v5.rmb_base))
+		adsp->q6v5.rmb_base = NULL;
+
 	ret = qcom_q6v5_init(&adsp->q6v5, pdev, rproc, desc->crash_reason_smem, desc->load_state,
 			     qcom_pas_handover);
 	if (ret)
--
2.42.0


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

* [PATCH v3 3/4] remoteproc: qcom_q6v5_pas: Add support to attach a DSP
  2024-06-20 12:01 [PATCH v3 0/4]remoteproc: qcom_q6v5_pas: Add support for QDU1000/QRU1000 mpss Komal Bajaj
  2024-06-20 12:01 ` [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices Komal Bajaj
  2024-06-20 12:01 ` [PATCH v3 2/4] remoteproc: qcom: q6v5: Add support for q6 rmb registers Komal Bajaj
@ 2024-06-20 12:01 ` Komal Bajaj
  2024-06-20 21:58   ` Dmitry Baryshkov
  2024-06-25 20:03   ` Bjorn Andersson
  2024-06-20 12:01 ` [PATCH v3 4/4] remoteproc: qcom_q6v5_pas: Add QDU1000/QRU1000 mpss compatible Komal Bajaj
  3 siblings, 2 replies; 10+ messages in thread
From: Komal Bajaj @ 2024-06-20 12:01 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Melody Olvera, Komal Bajaj

From: Melody Olvera <quic_molvera@quicinc.com>

Some chipsets will have DSPs which will have begun running prior
to linux booting, so add support to late attach these DSPs by
adding support for:
- run-time checking of an offline or running DSP via rmb register
- a late attach framework to attach to the running DSP
- a handshake mechanism to ensure full and proper booting via rmb

Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 102 +++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index b9759f6b2283..32d45c18e15e 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -11,6 +11,7 @@
 #include <linux/delay.h>
 #include <linux/firmware.h>
 #include <linux/interrupt.h>
+#include <linux/iopoll.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
@@ -258,6 +259,94 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw)
 	return ret;
 }

+static int adsp_signal_q6v5(struct qcom_adsp *adsp)
+{
+	unsigned int val;
+	int ret;
+
+	if (adsp->q6v5.rmb_base) {
+		ret = readl_poll_timeout(adsp->q6v5.rmb_base + RMB_BOOT_WAIT_REG,
+					 val, val, 20000,
+					 RMB_POLL_MAX_TIMES * 20000);
+		if (ret < 0)
+			return ret;
+
+		writel_relaxed(1, adsp->q6v5.rmb_base + RMB_BOOT_CONT_REG);
+	}
+
+	return 0;
+}
+
+static int adsp_attach(struct rproc *rproc)
+{
+	struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
+	int ret;
+
+	ret = qcom_q6v5_prepare(&adsp->q6v5);
+	if (ret)
+		return ret;
+
+	ret = adsp_pds_enable(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
+	if (ret < 0)
+		goto disable_irqs;
+
+	ret = clk_prepare_enable(adsp->xo);
+	if (ret)
+		goto disable_proxy_pds;
+
+	ret = clk_prepare_enable(adsp->aggre2_clk);
+	if (ret)
+		goto disable_xo_clk;
+
+	if (adsp->cx_supply) {
+		ret = regulator_enable(adsp->cx_supply);
+		if (ret)
+			goto disable_aggre2_clk;
+	}
+
+	if (adsp->px_supply) {
+		ret = regulator_enable(adsp->px_supply);
+		if (ret)
+			goto disable_cx_supply;
+	}
+
+	/* if needed, signal Q6 to continute booting */
+	ret = adsp_signal_q6v5(adsp);
+	if (ret < 0) {
+		dev_err(adsp->dev, "Didn't get rmb signal from  %s\n", rproc->name);
+		goto disable_px_supply;
+	};
+
+	ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
+	if (ret == -ETIMEDOUT) {
+		dev_err(adsp->dev, "start timed out\n");
+		qcom_scm_pas_shutdown(adsp->pas_id);
+		goto disable_px_supply;
+	}
+
+	return 0;
+
+disable_px_supply:
+	if (adsp->px_supply)
+		regulator_disable(adsp->px_supply);
+disable_cx_supply:
+	if (adsp->cx_supply)
+		regulator_disable(adsp->cx_supply);
+disable_aggre2_clk:
+	clk_disable_unprepare(adsp->aggre2_clk);
+disable_xo_clk:
+	clk_disable_unprepare(adsp->xo);
+disable_proxy_pds:
+	adsp_pds_disable(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
+disable_irqs:
+	qcom_q6v5_unprepare(&adsp->q6v5);
+
+	/* Remove pointer to the loaded firmware, only valid in adsp_load() & adsp_start() */
+	adsp->firmware = NULL;
+
+	return ret;
+}
+
 static int adsp_start(struct rproc *rproc)
 {
 	struct qcom_adsp *adsp = rproc->priv;
@@ -320,6 +409,13 @@ static int adsp_start(struct rproc *rproc)
 		goto release_pas_metadata;
 	}

+	/* if needed, signal Q6 to continute booting */
+	ret = adsp_signal_q6v5(adsp);
+	if (ret < 0) {
+		dev_err(adsp->dev, "Didn't get rmb signal from  %s\n", rproc->name);
+		goto release_pas_metadata;
+	}
+
 	ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
 	if (ret == -ETIMEDOUT) {
 		dev_err(adsp->dev, "start timed out\n");
@@ -432,6 +528,7 @@ static unsigned long adsp_panic(struct rproc *rproc)
 static const struct rproc_ops adsp_ops = {
 	.unprepare = adsp_unprepare,
 	.start = adsp_start,
+	.attach = adsp_attach,
 	.stop = adsp_stop,
 	.da_to_va = adsp_da_to_va,
 	.parse_fw = qcom_register_dump_segments,
@@ -442,6 +539,7 @@ static const struct rproc_ops adsp_ops = {
 static const struct rproc_ops adsp_minidump_ops = {
 	.unprepare = adsp_unprepare,
 	.start = adsp_start,
+	.attach = adsp_attach,
 	.stop = adsp_stop,
 	.da_to_va = adsp_da_to_va,
 	.parse_fw = qcom_register_dump_segments,
@@ -779,6 +877,10 @@ static int adsp_probe(struct platform_device *pdev)
 	if (ret)
 		goto detach_proxy_pds;

+	if (adsp->q6v5.rmb_base &&
+			readl_relaxed(adsp->q6v5.rmb_base + RMB_Q6_BOOT_STATUS_REG))
+		rproc->state = RPROC_DETACHED;
+
 	qcom_add_glink_subdev(rproc, &adsp->glink_subdev, desc->ssr_name);
 	qcom_add_smd_subdev(rproc, &adsp->smd_subdev);
 	adsp->sysmon = qcom_add_sysmon_subdev(rproc,
--
2.42.0


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

* [PATCH v3 4/4] remoteproc: qcom_q6v5_pas: Add QDU1000/QRU1000 mpss compatible
  2024-06-20 12:01 [PATCH v3 0/4]remoteproc: qcom_q6v5_pas: Add support for QDU1000/QRU1000 mpss Komal Bajaj
                   ` (2 preceding siblings ...)
  2024-06-20 12:01 ` [PATCH v3 3/4] remoteproc: qcom_q6v5_pas: Add support to attach a DSP Komal Bajaj
@ 2024-06-20 12:01 ` Komal Bajaj
  3 siblings, 0 replies; 10+ messages in thread
From: Komal Bajaj @ 2024-06-20 12:01 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Melody Olvera, Komal Bajaj

Add the compatible for the mpss found in the QDU1000 and QRU1000
SoCs. These platforms require the driver to complete a modem
handshake using the RMB registers provided.

Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
---
 drivers/remoteproc/qcom_q6v5_pas.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 32d45c18e15e..d543fa2572f8 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -1432,6 +1432,7 @@ static const struct of_device_id adsp_of_match[] = {
 	{ .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 },
+	{ .compatible = "qcom,qdu1000-mpss-pas", .data = &sm8550_mpss_resource },
 	{ .compatible = "qcom,sc7180-adsp-pas", .data = &sm8250_adsp_resource},
 	{ .compatible = "qcom,sc7180-mpss-pas", .data = &mpss_resource_init},
 	{ .compatible = "qcom,sc7280-adsp-pas", .data = &sm8350_adsp_resource},
--
2.42.0


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

* Re: [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices
  2024-06-20 12:01 ` [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices Komal Bajaj
@ 2024-06-20 13:20   ` Krzysztof Kozlowski
  2024-06-20 13:45   ` Rob Herring (Arm)
  1 sibling, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2024-06-20 13:20 UTC (permalink / raw)
  To: Komal Bajaj, Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Melody Olvera

On 20/06/2024 14:01, Komal Bajaj wrote:
> From: Melody Olvera <quic_molvera@quicinc.com>
> 
> Document the compatible for the component used to boot the MPSS on the
> QDU1000 and QRU1000 SoCs.
> 
> The QDU1000 and QRU1000 mpss boot process now requires the specification
> of an RMB register space to complete the handshake needed to start or

What is RMB?

> attach the mpss.

mpss? MPSS?

> 
> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> ---
>  .../remoteproc/qcom,qdu1000-mpss-pas.yaml     | 129 ++++++++++++++++++
>  1 file changed, 129 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml
> 
> diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml
> new file mode 100644
> index 000000000000..71c5a85b679e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml
> @@ -0,0 +1,129 @@
> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/remoteproc/qcom,qdu1000-mpss-pas.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Qualcomm QDU1000 Modem Peripheral Authentication Service
> +
> +maintainers:
> +  - Melody Olvera <quic_molvera@quicinc.com>
> +  - Komal Bajaj <quic_kbajaj@quicinc.com>
> +
> +description:
> +  Qualcomm QDU1000 SoC Peripheral Authentication Service loads and boots firmware
> +  on the Qualcomm DSP Hexagon core.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - qcom,qdu1000-mpss-pas
> +
> +  reg:
> +    items:
> +      - description: Address offset and size for MPSS PAS register set
> +      - description: Address offset and size for MPSS RMB register set

10 words, 8 are entirely redundant. This cannot be anything else than
address offset and size of some register set. Please write efficient and
understandable code. E.g.
"MPSS main Peripheral Authentication Service"
"MPSS something-explain-what-is-rmb"


...

> +        glink-edge {
> +            interrupts-extended = <&ipcc IPCC_CLIENT_MPSS
> +                                         IPCC_MPROC_SIGNAL_GLINK_QMP
> +                                         IRQ_TYPE_EDGE_RISING>;
> +            mboxes = <&ipcc IPCC_CLIENT_MPSS IPCC_MPROC_SIGNAL_GLINK_QMP>;
> +
> +            label = "modem";
> +            qcom,remote-pid = <2>;
> +        };

This wasn't tested.

Best regards,
Krzysztof


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

* Re: [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices
  2024-06-20 12:01 ` [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices Komal Bajaj
  2024-06-20 13:20   ` Krzysztof Kozlowski
@ 2024-06-20 13:45   ` Rob Herring (Arm)
  1 sibling, 0 replies; 10+ messages in thread
From: Rob Herring (Arm) @ 2024-06-20 13:45 UTC (permalink / raw)
  To: Komal Bajaj
  Cc: linux-remoteproc, linux-kernel, devicetree, Bjorn Andersson,
	Mathieu Poirier, linux-arm-msm, Melody Olvera, Conor Dooley,
	Krzysztof Kozlowski


On Thu, 20 Jun 2024 17:31:40 +0530, Komal Bajaj wrote:
> From: Melody Olvera <quic_molvera@quicinc.com>
> 
> Document the compatible for the component used to boot the MPSS on the
> QDU1000 and QRU1000 SoCs.
> 
> The QDU1000 and QRU1000 mpss boot process now requires the specification
> of an RMB register space to complete the handshake needed to start or
> attach the mpss.
> 
> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> ---
>  .../remoteproc/qcom,qdu1000-mpss-pas.yaml     | 129 ++++++++++++++++++
>  1 file changed, 129 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.example.dts:70.3-71.1 syntax error
FATAL ERROR: Unable to parse input tree
make[2]: *** [scripts/Makefile.lib:427: Documentation/devicetree/bindings/remoteproc/qcom,qdu1000-mpss-pas.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1430: dt_binding_check] Error 2
make: *** [Makefile:240: __sub-make] Error 2

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20240620120143.12375-2-quic_kbajaj@quicinc.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


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

* Re: [PATCH v3 2/4] remoteproc: qcom: q6v5: Add support for q6 rmb registers
  2024-06-20 12:01 ` [PATCH v3 2/4] remoteproc: qcom: q6v5: Add support for q6 rmb registers Komal Bajaj
@ 2024-06-20 21:38   ` Dmitry Baryshkov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2024-06-20 21:38 UTC (permalink / raw)
  To: Komal Bajaj
  Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel, Melody Olvera

On Thu, Jun 20, 2024 at 05:31:41PM GMT, Komal Bajaj wrote:
> From: Melody Olvera <quic_molvera@quicinc.com>
> 
> When attaching a running Q6, the remoteproc driver needs a way
> to communicate with the Q6 using rmb registers, so allow the
> rmb register to be gotten from the device tree if present.

rmb or RMB? And what is it?

> 
> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> ---
>  drivers/remoteproc/qcom_q6v5.h     | 8 ++++++++
>  drivers/remoteproc/qcom_q6v5_pas.c | 4 ++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5.h b/drivers/remoteproc/qcom_q6v5.h
> index 5a859c41896e..95824d5b64ce 100644
> --- a/drivers/remoteproc/qcom_q6v5.h
> +++ b/drivers/remoteproc/qcom_q6v5.h
> @@ -7,6 +7,12 @@
>  #include <linux/completion.h>
>  #include <linux/soc/qcom/qcom_aoss.h>
> 
> +#define RMB_BOOT_WAIT_REG 0x8
> +#define RMB_BOOT_CONT_REG 0xC
> +#define RMB_Q6_BOOT_STATUS_REG 0x10
> +
> +#define RMB_POLL_MAX_TIMES 250
> +
>  struct icc_path;
>  struct rproc;
>  struct qcom_smem_stat;
> @@ -16,6 +22,8 @@ struct qcom_q6v5 {
>  	struct device *dev;
>  	struct rproc *rproc;
> 
> +	void __iomem *rmb_base;
> +

Why is this a part of the common structure and is not a part of the _pas
struct?

>  	struct qcom_smem_state *state;
>  	struct qmp *qmp;
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index 8458bcfe9e19..b9759f6b2283 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -770,6 +770,10 @@ static int adsp_probe(struct platform_device *pdev)
>  		goto free_rproc;
>  	adsp->proxy_pd_count = ret;
> 
> +	adsp->q6v5.rmb_base = devm_platform_ioremap_resource_byname(pdev, "rmb");
> +	if (IS_ERR(adsp->q6v5.rmb_base))
> +		adsp->q6v5.rmb_base = NULL;
> +
>  	ret = qcom_q6v5_init(&adsp->q6v5, pdev, rproc, desc->crash_reason_smem, desc->load_state,
>  			     qcom_pas_handover);
>  	if (ret)
> --
> 2.42.0
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH v3 3/4] remoteproc: qcom_q6v5_pas: Add support to attach a DSP
  2024-06-20 12:01 ` [PATCH v3 3/4] remoteproc: qcom_q6v5_pas: Add support to attach a DSP Komal Bajaj
@ 2024-06-20 21:58   ` Dmitry Baryshkov
  2024-06-25 20:03   ` Bjorn Andersson
  1 sibling, 0 replies; 10+ messages in thread
From: Dmitry Baryshkov @ 2024-06-20 21:58 UTC (permalink / raw)
  To: Komal Bajaj
  Cc: Bjorn Andersson, Mathieu Poirier, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
	linux-remoteproc, devicetree, linux-kernel, Melody Olvera

On Thu, Jun 20, 2024 at 05:31:42PM GMT, Komal Bajaj wrote:
> From: Melody Olvera <quic_molvera@quicinc.com>
> 
> Some chipsets will have DSPs which will have begun running prior
> to linux booting, so add support to late attach these DSPs by
> adding support for:
> - run-time checking of an offline or running DSP via rmb register
> - a late attach framework to attach to the running DSP
> - a handshake mechanism to ensure full and proper booting via rmb
> 
> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> ---
>  drivers/remoteproc/qcom_q6v5_pas.c | 102 +++++++++++++++++++++++++++++
>  1 file changed, 102 insertions(+)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index b9759f6b2283..32d45c18e15e 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -11,6 +11,7 @@
>  #include <linux/delay.h>
>  #include <linux/firmware.h>
>  #include <linux/interrupt.h>
> +#include <linux/iopoll.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> @@ -258,6 +259,94 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw)
>  	return ret;
>  }
> 
> +static int adsp_signal_q6v5(struct qcom_adsp *adsp)
> +{
> +	unsigned int val;
> +	int ret;
> +
> +	if (adsp->q6v5.rmb_base) {
> +		ret = readl_poll_timeout(adsp->q6v5.rmb_base + RMB_BOOT_WAIT_REG,
> +					 val, val, 20000,
> +					 RMB_POLL_MAX_TIMES * 20000);
> +		if (ret < 0)
> +			return ret;
> +
> +		writel_relaxed(1, adsp->q6v5.rmb_base + RMB_BOOT_CONT_REG);
> +	}
> +
> +	return 0;
> +}
> +
> +static int adsp_attach(struct rproc *rproc)
> +{
> +	struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
> +	int ret;
> +
> +	ret = qcom_q6v5_prepare(&adsp->q6v5);
> +	if (ret)
> +		return ret;
> +
> +	ret = adsp_pds_enable(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
> +	if (ret < 0)
> +		goto disable_irqs;
> +
> +	ret = clk_prepare_enable(adsp->xo);
> +	if (ret)
> +		goto disable_proxy_pds;
> +
> +	ret = clk_prepare_enable(adsp->aggre2_clk);
> +	if (ret)
> +		goto disable_xo_clk;
> +
> +	if (adsp->cx_supply) {
> +		ret = regulator_enable(adsp->cx_supply);
> +		if (ret)
> +			goto disable_aggre2_clk;
> +	}
> +
> +	if (adsp->px_supply) {
> +		ret = regulator_enable(adsp->px_supply);
> +		if (ret)
> +			goto disable_cx_supply;
> +	}

Don't c&p code from adsp_start(). Extract common function instead.

> +
> +	/* if needed, signal Q6 to continute booting */
> +	ret = adsp_signal_q6v5(adsp);
> +	if (ret < 0) {
> +		dev_err(adsp->dev, "Didn't get rmb signal from  %s\n", rproc->name);
> +		goto disable_px_supply;
> +	};
> +
> +	ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
> +	if (ret == -ETIMEDOUT) {
> +		dev_err(adsp->dev, "start timed out\n");
> +		qcom_scm_pas_shutdown(adsp->pas_id);
> +		goto disable_px_supply;
> +	}
> +
> +	return 0;
> +
> +disable_px_supply:
> +	if (adsp->px_supply)
> +		regulator_disable(adsp->px_supply);
> +disable_cx_supply:
> +	if (adsp->cx_supply)
> +		regulator_disable(adsp->cx_supply);
> +disable_aggre2_clk:
> +	clk_disable_unprepare(adsp->aggre2_clk);
> +disable_xo_clk:
> +	clk_disable_unprepare(adsp->xo);
> +disable_proxy_pds:
> +	adsp_pds_disable(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
> +disable_irqs:
> +	qcom_q6v5_unprepare(&adsp->q6v5);
> +
> +	/* Remove pointer to the loaded firmware, only valid in adsp_load() & adsp_start() */
> +	adsp->firmware = NULL;
> +
> +	return ret;
> +}
> +
>  static int adsp_start(struct rproc *rproc)
>  {
>  	struct qcom_adsp *adsp = rproc->priv;
> @@ -320,6 +409,13 @@ static int adsp_start(struct rproc *rproc)
>  		goto release_pas_metadata;
>  	}
> 
> +	/* if needed, signal Q6 to continute booting */
> +	ret = adsp_signal_q6v5(adsp);
> +	if (ret < 0) {
> +		dev_err(adsp->dev, "Didn't get rmb signal from  %s\n", rproc->name);

Move the error message to adsp_signal_q6v5(). Make the call conditional.

> +		goto release_pas_metadata;
> +	}
> +
>  	ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
>  	if (ret == -ETIMEDOUT) {
>  		dev_err(adsp->dev, "start timed out\n");
> @@ -432,6 +528,7 @@ static unsigned long adsp_panic(struct rproc *rproc)
>  static const struct rproc_ops adsp_ops = {
>  	.unprepare = adsp_unprepare,
>  	.start = adsp_start,
> +	.attach = adsp_attach,
>  	.stop = adsp_stop,
>  	.da_to_va = adsp_da_to_va,
>  	.parse_fw = qcom_register_dump_segments,
> @@ -442,6 +539,7 @@ static const struct rproc_ops adsp_ops = {
>  static const struct rproc_ops adsp_minidump_ops = {
>  	.unprepare = adsp_unprepare,
>  	.start = adsp_start,
> +	.attach = adsp_attach,
>  	.stop = adsp_stop,
>  	.da_to_va = adsp_da_to_va,
>  	.parse_fw = qcom_register_dump_segments,
> @@ -779,6 +877,10 @@ static int adsp_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto detach_proxy_pds;
> 
> +	if (adsp->q6v5.rmb_base &&
> +			readl_relaxed(adsp->q6v5.rmb_base + RMB_Q6_BOOT_STATUS_REG))

Misaligned

> +		rproc->state = RPROC_DETACHED;
> +
>  	qcom_add_glink_subdev(rproc, &adsp->glink_subdev, desc->ssr_name);
>  	qcom_add_smd_subdev(rproc, &adsp->smd_subdev);
>  	adsp->sysmon = qcom_add_sysmon_subdev(rproc,
> --
> 2.42.0
> 

-- 
With best wishes
Dmitry

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

* Re: [PATCH v3 3/4] remoteproc: qcom_q6v5_pas: Add support to attach a DSP
  2024-06-20 12:01 ` [PATCH v3 3/4] remoteproc: qcom_q6v5_pas: Add support to attach a DSP Komal Bajaj
  2024-06-20 21:58   ` Dmitry Baryshkov
@ 2024-06-25 20:03   ` Bjorn Andersson
  1 sibling, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2024-06-25 20:03 UTC (permalink / raw)
  To: Komal Bajaj
  Cc: Mathieu Poirier, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	linux-arm-msm, linux-remoteproc, devicetree, linux-kernel,
	Melody Olvera

On Thu, Jun 20, 2024 at 05:31:42PM GMT, Komal Bajaj wrote:
> From: Melody Olvera <quic_molvera@quicinc.com>
> 
> Some chipsets will have DSPs which will have begun running prior
> to linux booting, so add support to late attach these DSPs by
> adding support for:
> - run-time checking of an offline or running DSP via rmb register
> - a late attach framework to attach to the running DSP
> - a handshake mechanism to ensure full and proper booting via rmb

I don't fully understand what state we're going to find the remote side
in during this attach.

I think that between commit message and comments in the code it should
be clear what the expected flow is, why there is a 5 second timeout, why
does Linux tell the DSP to "continue boot", etc.

Regards,
Bjorn

> 
> Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
> Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
> ---
>  drivers/remoteproc/qcom_q6v5_pas.c | 102 +++++++++++++++++++++++++++++
>  1 file changed, 102 insertions(+)
> 
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index b9759f6b2283..32d45c18e15e 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -11,6 +11,7 @@
>  #include <linux/delay.h>
>  #include <linux/firmware.h>
>  #include <linux/interrupt.h>
> +#include <linux/iopoll.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> @@ -258,6 +259,94 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw)
>  	return ret;
>  }
> 
> +static int adsp_signal_q6v5(struct qcom_adsp *adsp)
> +{
> +	unsigned int val;
> +	int ret;
> +
> +	if (adsp->q6v5.rmb_base) {
> +		ret = readl_poll_timeout(adsp->q6v5.rmb_base + RMB_BOOT_WAIT_REG,
> +					 val, val, 20000,
> +					 RMB_POLL_MAX_TIMES * 20000);
> +		if (ret < 0)
> +			return ret;
> +
> +		writel_relaxed(1, adsp->q6v5.rmb_base + RMB_BOOT_CONT_REG);
> +	}
> +
> +	return 0;
> +}
> +
> +static int adsp_attach(struct rproc *rproc)
> +{
> +	struct qcom_adsp *adsp = (struct qcom_adsp *)rproc->priv;
> +	int ret;
> +
> +	ret = qcom_q6v5_prepare(&adsp->q6v5);
> +	if (ret)
> +		return ret;
> +
> +	ret = adsp_pds_enable(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
> +	if (ret < 0)
> +		goto disable_irqs;
> +
> +	ret = clk_prepare_enable(adsp->xo);
> +	if (ret)
> +		goto disable_proxy_pds;
> +
> +	ret = clk_prepare_enable(adsp->aggre2_clk);
> +	if (ret)
> +		goto disable_xo_clk;
> +
> +	if (adsp->cx_supply) {
> +		ret = regulator_enable(adsp->cx_supply);
> +		if (ret)
> +			goto disable_aggre2_clk;
> +	}
> +
> +	if (adsp->px_supply) {
> +		ret = regulator_enable(adsp->px_supply);
> +		if (ret)
> +			goto disable_cx_supply;
> +	}
> +
> +	/* if needed, signal Q6 to continute booting */
> +	ret = adsp_signal_q6v5(adsp);
> +	if (ret < 0) {
> +		dev_err(adsp->dev, "Didn't get rmb signal from  %s\n", rproc->name);
> +		goto disable_px_supply;
> +	};
> +
> +	ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
> +	if (ret == -ETIMEDOUT) {
> +		dev_err(adsp->dev, "start timed out\n");
> +		qcom_scm_pas_shutdown(adsp->pas_id);
> +		goto disable_px_supply;
> +	}
> +
> +	return 0;
> +
> +disable_px_supply:
> +	if (adsp->px_supply)
> +		regulator_disable(adsp->px_supply);
> +disable_cx_supply:
> +	if (adsp->cx_supply)
> +		regulator_disable(adsp->cx_supply);
> +disable_aggre2_clk:
> +	clk_disable_unprepare(adsp->aggre2_clk);
> +disable_xo_clk:
> +	clk_disable_unprepare(adsp->xo);
> +disable_proxy_pds:
> +	adsp_pds_disable(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
> +disable_irqs:
> +	qcom_q6v5_unprepare(&adsp->q6v5);
> +
> +	/* Remove pointer to the loaded firmware, only valid in adsp_load() & adsp_start() */
> +	adsp->firmware = NULL;
> +
> +	return ret;
> +}
> +
>  static int adsp_start(struct rproc *rproc)
>  {
>  	struct qcom_adsp *adsp = rproc->priv;
> @@ -320,6 +409,13 @@ static int adsp_start(struct rproc *rproc)
>  		goto release_pas_metadata;
>  	}
> 
> +	/* if needed, signal Q6 to continute booting */
> +	ret = adsp_signal_q6v5(adsp);
> +	if (ret < 0) {
> +		dev_err(adsp->dev, "Didn't get rmb signal from  %s\n", rproc->name);
> +		goto release_pas_metadata;
> +	}
> +
>  	ret = qcom_q6v5_wait_for_start(&adsp->q6v5, msecs_to_jiffies(5000));
>  	if (ret == -ETIMEDOUT) {
>  		dev_err(adsp->dev, "start timed out\n");
> @@ -432,6 +528,7 @@ static unsigned long adsp_panic(struct rproc *rproc)
>  static const struct rproc_ops adsp_ops = {
>  	.unprepare = adsp_unprepare,
>  	.start = adsp_start,
> +	.attach = adsp_attach,
>  	.stop = adsp_stop,
>  	.da_to_va = adsp_da_to_va,
>  	.parse_fw = qcom_register_dump_segments,
> @@ -442,6 +539,7 @@ static const struct rproc_ops adsp_ops = {
>  static const struct rproc_ops adsp_minidump_ops = {
>  	.unprepare = adsp_unprepare,
>  	.start = adsp_start,
> +	.attach = adsp_attach,
>  	.stop = adsp_stop,
>  	.da_to_va = adsp_da_to_va,
>  	.parse_fw = qcom_register_dump_segments,
> @@ -779,6 +877,10 @@ static int adsp_probe(struct platform_device *pdev)
>  	if (ret)
>  		goto detach_proxy_pds;
> 
> +	if (adsp->q6v5.rmb_base &&
> +			readl_relaxed(adsp->q6v5.rmb_base + RMB_Q6_BOOT_STATUS_REG))
> +		rproc->state = RPROC_DETACHED;
> +
>  	qcom_add_glink_subdev(rproc, &adsp->glink_subdev, desc->ssr_name);
>  	qcom_add_smd_subdev(rproc, &adsp->smd_subdev);
>  	adsp->sysmon = qcom_add_sysmon_subdev(rproc,
> --
> 2.42.0
> 

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

end of thread, other threads:[~2024-06-25 19:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20 12:01 [PATCH v3 0/4]remoteproc: qcom_q6v5_pas: Add support for QDU1000/QRU1000 mpss Komal Bajaj
2024-06-20 12:01 ` [PATCH v3 1/4] dt-bindings: remoteproc: mpss: Document QDU1000/QRU1000 mpss devices Komal Bajaj
2024-06-20 13:20   ` Krzysztof Kozlowski
2024-06-20 13:45   ` Rob Herring (Arm)
2024-06-20 12:01 ` [PATCH v3 2/4] remoteproc: qcom: q6v5: Add support for q6 rmb registers Komal Bajaj
2024-06-20 21:38   ` Dmitry Baryshkov
2024-06-20 12:01 ` [PATCH v3 3/4] remoteproc: qcom_q6v5_pas: Add support to attach a DSP Komal Bajaj
2024-06-20 21:58   ` Dmitry Baryshkov
2024-06-25 20:03   ` Bjorn Andersson
2024-06-20 12:01 ` [PATCH v3 4/4] remoteproc: qcom_q6v5_pas: Add QDU1000/QRU1000 mpss compatible Komal Bajaj

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 read-only IMAP folder(s) and NNTP newsgroup(s).