Zephyr API
4.4.99
A Scalable Open Source RTOS
Toggle main menu visibility
Loading...
Searching...
No Matches
shmem.h
Go to the documentation of this file.
1
/*
2
* Copyright 2024,2026 NXP
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
12
13
#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_SHMEM_H_
14
#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_SHMEM_H_
15
16
#include <
zephyr/device.h
>
17
#include <
zephyr/arch/cpu.h
>
18
#include <
errno.h
>
19
26
28
33
#define SCMI_SHMEM_CHAN_STATUS_BUSY_BIT BIT(0)
38
42
#define SCMI_SHMEM_CHAN_FLAG_IRQ_BIT BIT(0)
43
51
struct
scmi_shmem_layout {
53
volatile
uint32_t
res0;
55
volatile
uint32_t
chan_status;
57
volatile
uint32_t
res1[2];
59
volatile
uint32_t
chan_flags;
61
volatile
uint32_t
len;
63
volatile
uint32_t
msg_hdr;
64
};
65
67
68
struct
scmi_message
;
69
79
int
scmi_shmem_write_message
(
const
struct
device
*shmem,
80
struct
scmi_message
*msg,
81
bool
use_polling);
82
92
int
scmi_shmem_read_hdr
(
const
struct
device
*shmem,
uint32_t
*
hdr
);
93
102
int
scmi_shmem_read_message
(
const
struct
device
*shmem,
103
struct
scmi_message
*msg);
104
112
void
scmi_shmem_update_flags
(
const
struct
device
*shmem,
113
uint32_t
mask,
uint32_t
val);
114
120
uint32_t
scmi_shmem_channel_status
(
const
struct
device
*shmem);
121
129
int
scmi_shmem_vendor_write_message
(
struct
scmi_shmem_layout *layout);
130
138
int
scmi_shmem_vendor_read_message
(
const
struct
scmi_shmem_layout *layout);
139
148
void
scmi_shmem_mark_channel_free
(
const
struct
device
*dev);
149
153
154
#endif
/* _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_SHMEM_H_ */
cpu.h
device.h
errno.h
System error numbers.
scmi_shmem_channel_status
uint32_t scmi_shmem_channel_status(const struct device *shmem)
Read a channel's status.
scmi_shmem_vendor_read_message
int scmi_shmem_vendor_read_message(const struct scmi_shmem_layout *layout)
Process vendor specific features when reading message.
scmi_shmem_read_hdr
int scmi_shmem_read_hdr(const struct device *shmem, uint32_t *hdr)
Read a message header from a SHMEM area.
scmi_shmem_update_flags
void scmi_shmem_update_flags(const struct device *shmem, uint32_t mask, uint32_t val)
Update the channel flags.
scmi_shmem_vendor_write_message
int scmi_shmem_vendor_write_message(struct scmi_shmem_layout *layout)
Process vendor specific features when writing message.
scmi_shmem_mark_channel_free
void scmi_shmem_mark_channel_free(const struct device *dev)
Mark a SHMEM channel as free (acknowledge message consumption).
scmi_shmem_read_message
int scmi_shmem_read_message(const struct device *shmem, struct scmi_message *msg)
Read a message from a SHMEM area.
scmi_shmem_write_message
int scmi_shmem_write_message(const struct device *shmem, struct scmi_message *msg, bool use_polling)
Write a message in the SHMEM area.
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:513
scmi_message
SCMI message structure.
Definition
protocol.h:194
scmi_message::hdr
uint32_t hdr
Message header (see SCMI_MESSAGE_HDR_MAKE).
Definition
protocol.h:196
zephyr
drivers
firmware
scmi
shmem.h
Generated on
for Zephyr API by
1.17.0