summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/mtk_common.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-05-21 20:27:43 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2024-05-21 20:27:43 +0300
commitab7b884a34ffda718cb93c772f575e45e8241c62 (patch)
tree7ebcc8a3d353a7ee650e1c53540a86225487b41e /drivers/remoteproc/mtk_common.h
parente66128fa8e7e38ebd0b0c95578f8020aec6c0dee (diff)
parent4d5ba6ead1dc9fa298d727e92db40cd98564d1ac (diff)
downloadlinux-ab7b884a34ffda718cb93c772f575e45e8241c62.tar.xz
Merge tag 'rproc-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux
Pull remoteproc updates from Bjorn Andersson: "This makes the remoteproc core rproc_class const. DeviceTree bindings for a few different Qualcomm remoteprocs are updated to remove a range of validation warnings/errors. The Qualcomm SMD binding marks qcom,ipc deprecated, in favor or the mailbox interface. The TI K3 R5 remoteproc driver is updated to ensure that cores are powered up in the appropriate order. The driver also see a couple of fixes related to cleanups in error paths during probe. The Mediatek remoteproc driver is extended to support the MT8188 SCP core 1. Support for varying DRAM and IPI shared buffer sizes are introduced. This together with a couple of bug fixes and improvements to the driver. Support for the AMD-Xilinx Versal and Versal-NET platforms are added. Coredump support and support for parsing TCM information from DeviceTree is added to the Xilinx R5F remoteproc driver" * tag 'rproc-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (22 commits) dt-bindings: remoteproc: qcom,sdm845-adsp-pil: Fix qcom,halt-regs definition dt-bindings: remoteproc: qcom,sc7280-wpss-pil: Fix qcom,halt-regs definition dt-bindings: remoteproc: qcom,qcs404-cdsp-pil: Fix qcom,halt-regs definition dt-bindings: remoteproc: qcom,msm8996-mss-pil: allow glink-edge on msm8996 dt-bindings: remoteproc: qcom,smd-edge: Mark qcom,ipc as deprecated remoteproc: k3-r5: Jump to error handling labels in start/stop errors remoteproc: mediatek: Fix error code in scp_rproc_init() remoteproc: k3-r5: Do not allow core1 to power up before core0 via sysfs remoteproc: k3-r5: Wait for core0 power-up before powering up core1 remoteproc: mediatek: Add IMGSYS IPI command remoteproc: mediatek: Support setting DRAM and IPI shared buffer sizes remoteproc: mediatek: Support MT8188 SCP core 1 dt-bindings: remoteproc: mediatek: Support MT8188 dual-core SCP drivers: remoteproc: xlnx: Fix uninitialized tcm mode drivers: remoteproc: xlnx: Fix uninitialized variable use drivers: remoteproc: xlnx: Add Versal and Versal-NET support remoteproc: zynqmp: parse TCM from device tree dt-bindings: remoteproc: Add Tightly Coupled Memory (TCM) bindings remoteproc: zynqmp: fix lockstep mode memory region remoteproc: zynqmp: Add coredump support ...
Diffstat (limited to 'drivers/remoteproc/mtk_common.h')
-rw-r--r--drivers/remoteproc/mtk_common.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/remoteproc/mtk_common.h b/drivers/remoteproc/mtk_common.h
index 6d7736a031f7..fd5c539ab2ac 100644
--- a/drivers/remoteproc/mtk_common.h
+++ b/drivers/remoteproc/mtk_common.h
@@ -78,7 +78,6 @@
#define MT8195_L2TCM_OFFSET 0x850d0
#define SCP_FW_VER_LEN 32
-#define SCP_SHARE_BUFFER_SIZE 288
struct scp_run {
u32 signaled;
@@ -97,6 +96,11 @@ struct scp_ipi_desc {
struct mtk_scp;
+struct mtk_scp_sizes_data {
+ size_t max_dram_size;
+ size_t ipi_share_buffer_size;
+};
+
struct mtk_scp_of_data {
int (*scp_clk_get)(struct mtk_scp *scp);
int (*scp_before_load)(struct mtk_scp *scp);
@@ -110,6 +114,7 @@ struct mtk_scp_of_data {
u32 host_to_scp_int_bit;
size_t ipi_buf_offset;
+ const struct mtk_scp_sizes_data *scp_sizes;
};
struct mtk_scp_of_cluster {
@@ -141,10 +146,10 @@ struct mtk_scp {
struct scp_ipi_desc ipi_desc[SCP_IPI_MAX];
bool ipi_id_ack[SCP_IPI_MAX];
wait_queue_head_t ack_wq;
+ u8 *share_buf;
void *cpu_addr;
dma_addr_t dma_addr;
- size_t dram_size;
struct rproc_subdev *rpmsg_subdev;
@@ -162,7 +167,7 @@ struct mtk_scp {
struct mtk_share_obj {
u32 id;
u32 len;
- u8 share_buf[SCP_SHARE_BUFFER_SIZE];
+ u8 *share_buf;
};
void scp_memcpy_aligned(void __iomem *dst, const void *src, unsigned int len);