Thread (19 messages) 19 messages, 3 authors, 2023-02-10

Re: [PATCH v4 06/12] remoteproc: mediatek: Extract remoteproc initialization flow

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Date: 2023-02-09 12:43:17
Also in: linux-devicetree, linux-mediatek, linux-remoteproc, lkml

Il 09/02/23 08:40, Tinghan Shen ha scritto:
quoted hunk ↗ jump to hunk
This is the preparation for probing multi-core SCP. The remoteproc
initialization flow is similar on cores and is reuesd to avoid
redundant code.

The registers of config and l1tcm are shared for multi-core
SCP. Reuse the mapped addresses for all cores.

Signed-off-by: Tinghan Shen <redacted>
---
  drivers/remoteproc/mtk_common.h |  7 +++++
  drivers/remoteproc/mtk_scp.c    | 55 +++++++++++++++++++++------------
  2 files changed, 42 insertions(+), 20 deletions(-)
diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h
index 3778894c96f3..20c1a90be77d 100644
--- a/drivers/remoteproc/mtk_common.h
+++ b/drivers/remoteproc/mtk_common.h
@@ -112,6 +112,13 @@ struct mtk_scp_of_data {
  	size_t ipi_buf_offset;
  };
  
+struct mtk_scp_of_regs {
That's not a common structure, but rather a commodity for internal flow: the right
place for this one is in mtk_scp.c

Regards,
Angelo
quoted hunk ↗ jump to hunk
+	void __iomem *reg_base;
+	void __iomem *l1tcm_base;
+	size_t l1tcm_size;
+	phys_addr_t l1tcm_phys;
+};
+
  struct mtk_scp {
  	struct device *dev;
  	struct rproc *rproc;
diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
index b92274067522..feebcadd56cd 100644
--- a/drivers/remoteproc/mtk_scp.c
+++ b/drivers/remoteproc/mtk_scp.c
@@ -854,7 +854,8 @@ static void scp_remove_rpmsg_subdev(struct mtk_scp *scp)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help