7#ifndef ZEPHYR_INCLUDE_IPC_BACKEND_INTEL_ADSP_IPC_H
8#define ZEPHYR_INCLUDE_IPC_BACKEND_INTEL_ADSP_IPC_H
10#include <intel_adsp_ipc_devtree.h>
65#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
115typedef bool (*intel_adsp_ipc_done_t)(
const struct device *dev,
void *arg);
119#ifdef CONFIG_PM_DEVICE
120typedef int (*intel_adsp_ipc_resume_handler_t)(
const struct device *dev,
void *arg);
122typedef int (*intel_adsp_ipc_suspend_handler_t)(
const struct device *dev,
void *arg);
130 volatile struct intel_adsp_ipc *
regs;
149#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
151 intel_adsp_ipc_handler_t handle_message;
157 intel_adsp_ipc_done_t done_notify;
163#ifdef CONFIG_PM_DEVICE
165 intel_adsp_ipc_resume_handler_t resume_fn;
168 void *resume_fn_args;
171 intel_adsp_ipc_suspend_handler_t suspend_fn;
174 void *suspend_fn_args;
189#ifdef CONFIG_PM_DEVICE
198void intel_adsp_ipc_set_resume_handler(
const struct device *dev, intel_adsp_ipc_resume_handler_t fn,
208void intel_adsp_ipc_set_suspend_handler(
const struct device *dev,
209 intel_adsp_ipc_suspend_handler_t fn,
void *arg);
intel_adsp_cb_len
Enum on callback length argument to indicate which triggers the callback.
Definition intel_adsp_host_ipc.h:45
@ INTEL_ADSP_IPC_CB_DONE
Callback length to indicate this is a DONE message.
Definition intel_adsp_host_ipc.h:50
@ INTEL_ADSP_IPC_CB_MSG
Callback length to indicate this is an IPC message.
Definition intel_adsp_host_ipc.h:47
intel_adsp_send_len
Enum on IPC send length argument to indicate IPC message type.
Definition intel_adsp_host_ipc.h:18
@ INTEL_ADSP_IPC_SEND_MSG_EMERGENCY
Emergency IPC message.
Definition intel_adsp_host_ipc.h:26
@ INTEL_ADSP_IPC_SEND_MSG_SYNC
Synchronous IPC message.
Definition intel_adsp_host_ipc.h:23
@ INTEL_ADSP_IPC_SEND_DONE
Send a DONE message.
Definition intel_adsp_host_ipc.h:29
@ INTEL_ADSP_IPC_SEND_IS_COMPLETE
Query backend to see if IPC is complete.
Definition intel_adsp_host_ipc.h:32
@ INTEL_ADSP_IPC_SEND_MSG
Normal IPC message.
Definition intel_adsp_host_ipc.h:20
intel_adsp_cb_ret
Enum on callback return values.
Definition intel_adsp_host_ipc.h:36
@ INTEL_ADSP_IPC_CB_RET_OKAY
Callback return to indicate no issue.
Definition intel_adsp_host_ipc.h:38
@ INTEL_ADSP_IPC_CB_RET_EXT_COMPLETE
Callback return to signal needing external completion.
Definition intel_adsp_host_ipc.h:41
#define bool
Definition stdbool.h:13
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition device.h:510
void * data
Address of the device instance private data.
Definition device.h:520
Intel Audio DSP IPC service backend config struct.
Definition intel_adsp_host_ipc.h:128
volatile struct intel_adsp_ipc * regs
Pointer to hardware register block.
Definition intel_adsp_host_ipc.h:130
Intel Audio DSP IPC service backend data struct.
Definition intel_adsp_host_ipc.h:136
struct k_sem sem
Semaphore used to wait for remote acknowledgment of sent message.
Definition intel_adsp_host_ipc.h:138
bool tx_ack_pending
Pending TX acknowlegement.
Definition intel_adsp_host_ipc.h:144
const struct ipc_ept_cfg * ept_cfg
Pointer to endpoint configuration.
Definition intel_adsp_host_ipc.h:147
struct k_spinlock lock
General driver lock.
Definition intel_adsp_host_ipc.h:141
Endpoint private data struct.
Definition intel_adsp_host_ipc.h:181
void * priv
Pointer to additional private data.
Definition intel_adsp_host_ipc.h:186
int cb_ret
Callback return value (enum intel_adsp_cb_ret).
Definition intel_adsp_host_ipc.h:183
Struct for IPC message descriptor.
Definition intel_adsp_host_ipc.h:54
k_timeout_t timeout
Timeout for sending synchronuous message.
Definition intel_adsp_host_ipc.h:62
uint32_t data
Header specific to platform.
Definition intel_adsp_host_ipc.h:56
uint32_t ext_data
Extension specific to platform.
Definition intel_adsp_host_ipc.h:59
Endpoint configuration structure.
Definition ipc_service.h:206
Semaphore structure.
Definition kernel.h:3397
Kernel Spin Lock.
Definition spinlock.h:45
Kernel timeout type.
Definition clock.h:65