Some Qualcomm SoCs using the generic PAS remoteproc driver (e.g.
Shikra) implement the BAM-DMUX protocol on the modem remoteproc to
expose network data channels. The hardware/firmware resources
required by the BAM-DMUX driver are described in an extra device
tree node below the modem remoteproc, with the compatible
"qcom,bam-dmux".
qcom_q6v5_mss.c already creates a platform device for this node
(commit 59983c74fc42 ("remoteproc: qcom_q6v5_mss: Create platform
device for BAM-DMUX")), but qcom_q6v5_pas.c has no equivalent logic,
so the bam-dmux node never probes on SoCs handled by this driver.
Mirror the qcom_q6v5_mss.c approach: create a platform device
specifically for the "qcom,bam-dmux" child node on probe, and
destroy it on remove. of_get_compatible_child() returns NULL when
the node is absent, and of_platform_device_create()/of_node_put()
are NULL-safe, so this is a no-op for the many PAS-based SoCs that
have no bam-dmux child.
Signed-off-by: Vishnu Santhosh <[email protected]>
---
drivers/remoteproc/qcom_q6v5_pas.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c
b/drivers/remoteproc/qcom_q6v5_pas.c
index
808e9609988d31ff9d18b441914f761192909904..53c839ecc417eba2c53566011f174f3bf811c443
100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
+#include <linux/of_platform.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
@@ -114,6 +115,7 @@ struct qcom_pas {
struct qcom_rproc_pdm pdm_subdev;
struct qcom_rproc_ssr ssr_subdev;
struct qcom_sysmon *sysmon;
+ struct platform_device *bam_dmux;
struct qcom_scm_pas_context *pas_ctx;
struct qcom_scm_pas_context *dtb_pas_ctx;
@@ -735,6 +737,7 @@ static int qcom_pas_probe(struct platform_device *pdev)
const struct qcom_pas_data *desc;
struct qcom_pas *pas;
struct rproc *rproc;
+ struct device_node *node;
const char *fw_name, *dtb_fw_name = NULL;
const struct rproc_ops *ops = &qcom_pas_ops;
int ret;
@@ -856,6 +859,10 @@ static int qcom_pas_probe(struct platform_device *pdev)
if (ret)
goto remove_ssr_sysmon;
+ node = of_get_compatible_child(pdev->dev.of_node, "qcom,bam-dmux");
+ pas->bam_dmux = of_platform_device_create(node, NULL, &pdev->dev);
+ of_node_put(node);
+
return 0;
remove_ssr_sysmon:
@@ -880,6 +887,9 @@ static void qcom_pas_remove(struct platform_device *pdev)
{
struct qcom_pas *pas = platform_get_drvdata(pdev);
+ if (pas->bam_dmux)
+ of_platform_device_destroy(&pas->bam_dmux->dev, NULL);
+
rproc_del(pas->rproc);
qcom_q6v5_deinit(&pas->q6v5);
---
base-commit: 0e35b9b6ec0ffcc5e23cbdec09f5c622ad532b53
change-id: 20260707-qcom-q6v5-pas-bam-dmux-a182d965a02a
Best regards,
--
Vishnu Santhosh <[email protected]>