Skip to content

Commit 9ea1666

Browse files
tinghan-shenmathieupoirier
authored andcommitted
remoteproc: mediatek: Extract SCP common registers
This is the 1st preliminary steps for probing multi-core SCP. The registers of config and l1tcm are common on single-core SCP and multi-core SCP. Extract these registers out to reduce duplicated fields in mtk_scp when multiple SCP instances are created. Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20230901080935.14571-6-tinghan.shen@mediatek.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
1 parent 6a1c9aa commit 9ea1666

3 files changed

Lines changed: 96 additions & 85 deletions

File tree

drivers/remoteproc/mtk_common.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,20 @@ struct mtk_scp_of_data {
100100
size_t ipi_buf_offset;
101101
};
102102

103+
struct mtk_scp_of_cluster {
104+
void __iomem *reg_base;
105+
void __iomem *l1tcm_base;
106+
size_t l1tcm_size;
107+
phys_addr_t l1tcm_phys;
108+
};
109+
103110
struct mtk_scp {
104111
struct device *dev;
105112
struct rproc *rproc;
106113
struct clk *clk;
107-
void __iomem *reg_base;
108114
void __iomem *sram_base;
109115
size_t sram_size;
110116
phys_addr_t sram_phys;
111-
void __iomem *l1tcm_base;
112-
size_t l1tcm_size;
113-
phys_addr_t l1tcm_phys;
114117

115118
const struct mtk_scp_of_data *data;
116119

@@ -128,6 +131,8 @@ struct mtk_scp {
128131
size_t dram_size;
129132

130133
struct rproc_subdev *rpmsg_subdev;
134+
135+
struct mtk_scp_of_cluster *cluster;
131136
};
132137

133138
/**

0 commit comments

Comments
 (0)