Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
intel_adsp_host_ipc.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022, 2025 Intel Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_IPC_BACKEND_INTEL_ADSP_IPC_H
8#define ZEPHYR_INCLUDE_IPC_BACKEND_INTEL_ADSP_IPC_H
9
10#include <intel_adsp_ipc_devtree.h>
11#include <zephyr/kernel.h>
12#include <zephyr/device.h>
13#include <zephyr/pm/device.h>
14
16
34
43
52
64
65#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
66
90typedef bool (*intel_adsp_ipc_handler_t)(const struct device *dev, void *arg, uint32_t data,
91 uint32_t ext_data);
92
115typedef bool (*intel_adsp_ipc_done_t)(const struct device *dev, void *arg);
116
117#endif /* CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE */
118
119#ifdef CONFIG_PM_DEVICE
120typedef int (*intel_adsp_ipc_resume_handler_t)(const struct device *dev, void *arg);
121
122typedef int (*intel_adsp_ipc_suspend_handler_t)(const struct device *dev, void *arg);
123#endif /* CONFIG_PM_DEVICE */
124
130 volatile struct intel_adsp_ipc *regs;
131};
132
138 struct k_sem sem;
139
142
145
147 const struct ipc_ept_cfg *ept_cfg;
148
149#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
151 intel_adsp_ipc_handler_t handle_message;
152
154 void *handler_arg;
155
157 intel_adsp_ipc_done_t done_notify;
158
160 void *done_arg;
161#endif /* CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE */
162
163#ifdef CONFIG_PM_DEVICE
165 intel_adsp_ipc_resume_handler_t resume_fn;
166
168 void *resume_fn_args;
169
171 intel_adsp_ipc_suspend_handler_t suspend_fn;
172
174 void *suspend_fn_args;
175#endif /* CONFIG_PM_DEVICE */
176};
177
184
186 void *priv;
187};
188
189#ifdef CONFIG_PM_DEVICE
190
198void intel_adsp_ipc_set_resume_handler(const struct device *dev, intel_adsp_ipc_resume_handler_t fn,
199 void *arg);
200
208void intel_adsp_ipc_set_suspend_handler(const struct device *dev,
209 intel_adsp_ipc_suspend_handler_t fn, void *arg);
210
211#endif /* CONFIG_PM_DEVICE */
212
213#endif /* ZEPHYR_INCLUDE_IPC_BACKEND_INTEL_ADSP_IPC_H */
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
Public kernel APIs.
#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