Zephyr API Documentation 4.3.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
17#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
18
42typedef bool (*intel_adsp_ipc_handler_t)(const struct device *dev, void *arg, uint32_t data,
43 uint32_t ext_data);
44#endif /* CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE */
45
68typedef bool (*intel_adsp_ipc_done_t)(const struct device *dev, void *arg);
69
70#ifdef CONFIG_PM_DEVICE
71typedef int (*intel_adsp_ipc_resume_handler_t)(const struct device *dev, void *arg);
72
73typedef int (*intel_adsp_ipc_suspend_handler_t)(const struct device *dev, void *arg);
74#endif /* CONFIG_PM_DEVICE */
75
81 volatile struct intel_adsp_ipc *regs;
82};
83
89 struct k_sem sem;
90
93
96
98 const struct ipc_ept_cfg *ept_cfg;
99
100#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
102 intel_adsp_ipc_handler_t handle_message;
103
105 void *handler_arg;
106#endif /* CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE */
107
110
112 void *done_arg;
113
114#ifdef CONFIG_PM_DEVICE
116 intel_adsp_ipc_resume_handler_t resume_fn;
117
119 void *resume_fn_args;
120
122 intel_adsp_ipc_suspend_handler_t suspend_fn;
123
125 void *suspend_fn_args;
126#endif /* CONFIG_PM_DEVICE */
127};
128
133 /* Message done flag. */
136 void *priv;
137};
138
139#ifdef CONFIG_PM_DEVICE
140
148void intel_adsp_ipc_set_resume_handler(const struct device *dev, intel_adsp_ipc_resume_handler_t fn,
149 void *arg);
150
158void intel_adsp_ipc_set_suspend_handler(const struct device *dev,
159 intel_adsp_ipc_suspend_handler_t fn, void *arg);
160
161#endif /* CONFIG_PM_DEVICE */
162
163#endif /* ZEPHYR_INCLUDE_IPC_BACKEND_INTEL_ADSP_IPC_H */
bool(* intel_adsp_ipc_done_t)(const struct device *dev, void *arg)
Intel ADSP IPC Message Complete Callback.
Definition intel_adsp_host_ipc.h:68
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:513
void * data
Address of the device instance private data.
Definition device.h:523
Intel Audio DSP IPC service backend config struct.
Definition intel_adsp_host_ipc.h:79
volatile struct intel_adsp_ipc * regs
Pointer to hardware register block.
Definition intel_adsp_host_ipc.h:81
Intel Audio DSP IPC service backend data struct.
Definition intel_adsp_host_ipc.h:87
struct k_sem sem
Semaphore used to wait for remote acknowledgment of sent message.
Definition intel_adsp_host_ipc.h:89
intel_adsp_ipc_done_t done_notify
Callback for done notification.
Definition intel_adsp_host_ipc.h:109
bool tx_ack_pending
Pending TX acknowlegement.
Definition intel_adsp_host_ipc.h:95
const struct ipc_ept_cfg * ept_cfg
Pointer to endpoint configuration.
Definition intel_adsp_host_ipc.h:98
void * done_arg
Argument for done notification callback.
Definition intel_adsp_host_ipc.h:112
struct k_spinlock lock
General driver lock.
Definition intel_adsp_host_ipc.h:92
Endpoint private data struct.
Definition intel_adsp_host_ipc.h:132
void * priv
Pointer to additional private data.
Definition intel_adsp_host_ipc.h:136
bool msg_done
Definition intel_adsp_host_ipc.h:134
Endpoint configuration structure.
Definition ipc_service.h:206
Semaphore structure.
Definition kernel.h:3594
Kernel Spin Lock.
Definition spinlock.h:45