1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2019 MediaTek Inc.
9 #include <linux/platform_device.h>
11 typedef void (*scp_ipi_handler_t) (void *data,
17 * enum ipi_id - the id of inter-processor interrupt
19 * @SCP_IPI_INIT: The interrupt from scp is to notfiy kernel
20 * SCP initialization completed.
21 * IPI_SCP_INIT is sent from SCP when firmware is
22 * loaded. AP doesn't need to send IPI_SCP_INIT
24 * For other IPI below, AP should send the request
25 * to SCP to trigger the interrupt.
26 * @SCP_IPI_MAX: The maximum IPI number
43 SCP_IPI_CROS_HOST_CMD,
46 SCP_IPI_NS_SERVICE = 0xFF,
50 struct mtk_scp *scp_get(struct platform_device *pdev);
51 void scp_put(struct mtk_scp *scp);
53 struct device *scp_get_device(struct mtk_scp *scp);
54 struct rproc *scp_get_rproc(struct mtk_scp *scp);
56 int scp_ipi_register(struct mtk_scp *scp, u32 id, scp_ipi_handler_t handler,
58 void scp_ipi_unregister(struct mtk_scp *scp, u32 id);
60 int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len,
63 unsigned int scp_get_vdec_hw_capa(struct mtk_scp *scp);
64 unsigned int scp_get_venc_hw_capa(struct mtk_scp *scp);
66 void *scp_mapping_dm_addr(struct mtk_scp *scp, u32 mem_addr);
68 #endif /* _MTK_SCP_H */