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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 09/02/23 08:40, Tinghan Shen ha scritto:
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 <tinghan.shen@xxxxxxxxxxxx>
---
  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

+	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)




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux