Quoting Srinivasa Rao Mandadapu (2022-09-08 06:23:38)Okay. Will change accordingly.
diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.cThis is sad.
index 02d17b4..207270d4 100644
--- a/drivers/remoteproc/qcom_q6v5_adsp.c
+++ b/drivers/remoteproc/qcom_q6v5_adsp.c
@@ -447,7 +447,7 @@ static unsigned long adsp_panic(struct rproc *rproc)
return qcom_q6v5_panic(&adsp->q6v5);
}
-static const struct rproc_ops adsp_ops = {
+static struct rproc_ops adsp_ops = {
.start = adsp_start,Why not have two different set of ops so that the function pointer table
.stop = adsp_stop,
.da_to_va = adsp_da_to_va,
@@ -590,6 +590,9 @@ static int adsp_probe(struct platform_device *pdev)
return ret;
}
+ if (desc->has_iommu)
+ adsp_ops.parse_fw = rproc_elf_load_rsc_table;
+
can't be hijacked? One for the parse_fw callback? Or simply return from
rproc_elf_load_rsc_table() when has_iommu is false?
rproc = rproc_alloc(&pdev->dev, pdev->name, &adsp_ops,