Skip to contentSkip to conversation

mailbox: mediatek: add support for dsp ipc

PATCH New Allen-KH Cheng 1 participant 1 message Oct 7, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mailbox: mediatek: add support for dsp ipc

This patch is for Mediatek DSP IPC which allows applications implement communication using mbox.

Two mailboxes used to send notification or short message between processors with dsp

mbox0 is for ipc request.
mbox1 is for ipc reply.

---
 drivers/mailbox/Kconfig            |  10 ++
 drivers/mailbox/Makefile           |   2 +
 drivers/mailbox/mtk-adsp-mailbox.c | 209 +++++++++++++++++++++++++++++
 3 files changed, 221 insertions(+)
 create mode 100644 drivers/mailbox/mtk-adsp-mailbox.c
drivers/mailbox/Kconfig +10 -0
index c9fc06c7e685..4435af555b63 100644
@@ -236,6 +236,16 @@ config MTK_CMDQ_MBOX
 	  critical time limitation, such as updating display configuration
 	  during the vblank.
 
+config MTK_ADSP_IPC_MBOX
+	tristate "MediaTek ADSP Mailbox Support"
+	depends on ARCH_MEDIATEK || COMPILE_TEST
+	help
+	  Say yes here to add support for ADSP IPC mailbox driver.
+	  This mailbox driver is used to send notification or short message
+	  between processors with dsp. It will place the
+	  message to the share buffer and will access the ADSP mailbox
+	  registers to kick dsp.
+
 config ZYNQMP_IPI_MBOX
 	bool "Xilinx ZynqMP IPI Mailbox"
 	depends on ARCH_ZYNQMP && OF
drivers/mailbox/Makefile +2 -0
index c2089f04887e..479a9ae56d5e 100644
@@ -51,6 +51,8 @@ obj-$(CONFIG_STM32_IPCC) 	+= stm32-ipcc.o
 
 obj-$(CONFIG_MTK_CMDQ_MBOX)	+= mtk-cmdq-mailbox.o
 
+obj-$(CONFIG_MTK_ADSP_IPC_MBOX)	+= mtk-adsp-mailbox.o
+
 obj-$(CONFIG_ZYNQMP_IPI_MBOX)	+= zynqmp-ipi-mailbox.o
 
 obj-$(CONFIG_SUN6I_MSGBOX)	+= sun6i-msgbox.o
drivers/mailbox/mtk-adsp-mailbox.c new file +209 -0

209 lines not on this page · raw message

Signature · 1 line
2.18.0