zephyr/drivers/ipm/CMakeLists.txt

21 lines
927 B
CMake
Raw Normal View History

# SPDX-License-Identifier: Apache-2.0
zephyr_syscall_header(${ZEPHYR_BASE}/include/zephyr/drivers/ipm.h)
zephyr_library()
zephyr_library_sources_ifdef(CONFIG_IPM_MCUX ipm_mcux.c)
zephyr_library_sources_ifdef(CONFIG_IPM_IMX ipm_imx.c)
zephyr_library_sources_ifdef(CONFIG_IPM_MHU ipm_mhu.c)
zephyr_library_sources_ifdef(CONFIG_IPM_STM32_IPCC ipm_stm32_ipcc.c)
zephyr_library_sources_ifdef(CONFIG_IPM_NRFX ipm_nrfx_ipc.c)
zephyr_library_sources_ifdef(CONFIG_IPM_STM32_HSEM ipm_stm32_hsem.c)
drivers/ipm: Add ipm_cavs_host: host/DSP communication on adsp_intel Intel Audio DSPs have "IPC" interrupt delivery and shared memory window hardware. The Sound Open Firmware project has historically used the combination of these to implement a bidirectional message-passing interface. As it happens, this protocol is an excellent fit for Zephyr's somewhat geriatric but still useful IPM interface. This implements a SOF-protocol-compatible transport that will hopefully prove a bit more futureproof for non-Intel SOF architectures. It is a software-only device, built on top of the underlying SOC APIs for the SRAM windows (in cavs-shim) and IPC (cavs_ipc). Note that SOF actually has two protocol variants (ipc3 and ipc4): in both, the command header (passed as the "id" parameter in IPM) is sent via the hardware doorbell register. But in ipc4, the second hardware scratch register is used to transmit the first four bytes of the command before involving the SRAM window (in ipc3, it's ignored). Both modes are supported by this driver, set IPM_CAVS_HOST_REGWORD to choose the "ipc4" variant. Finally: note that the memory layout for the windows in question is inherited from SOF, and for compatibility (with both SOF and with the offsets used by the host!) these can't be changed without major surgery. They're defined in kconfig, but should be treated as read-only until we get a chance to rework the way Zephyr does its SRAM window management (and probably in concert with the host drivers). Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-02-16 00:44:37 +08:00
zephyr_library_sources_ifdef(CONFIG_IPM_CAVS_HOST ipm_cavs_host.c)
zephyr_library_sources_ifdef(CONFIG_IPM_SEDI ipm_sedi.c)
zephyr_library_sources_ifdef(CONFIG_IPM_IVSHMEM ipm_ivshmem.c)
zephyr_library_sources_ifdef(CONFIG_ESP32_SOFT_IPM ipm_esp32.c)
zephyr_library_sources_ifdef(CONFIG_XLNX_IPI ipm_xlnx_ipi.c)
zephyr_library_sources_ifdef(CONFIG_IPM_MBOX ipm_mbox.c)
zephyr_library_sources_ifdef(CONFIG_USERSPACE ipm_handlers.c)