Zephyr API Documentation
4.1.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
shmem.h
Go to the documentation of this file.
1
/*
2
* Copyright 2024 NXP
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
12
#ifndef _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_SHMEM_H_
13
#define _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_SHMEM_H_
14
15
#include <
zephyr/device.h
>
16
#include <
zephyr/arch/cpu.h
>
17
#include <
errno.h
>
18
19
#define SCMI_SHMEM_CHAN_STATUS_BUSY_BIT BIT(0)
20
#define SCMI_SHMEM_CHAN_FLAG_IRQ_BIT BIT(0)
21
22
struct
scmi_shmem_layout
{
23
volatile
uint32_t
res0
;
24
volatile
uint32_t
chan_status
;
25
volatile
uint32_t
res1
[2];
26
volatile
uint32_t
chan_flags
;
27
volatile
uint32_t
len
;
28
volatile
uint32_t
msg_hdr
;
29
};
30
31
struct
scmi_message
;
32
42
int
scmi_shmem_write_message
(
const
struct
device
*shmem,
43
struct
scmi_message
*
msg
);
44
54
int
scmi_shmem_read_message
(
const
struct
device
*shmem,
55
struct
scmi_message
*
msg
);
56
66
void
scmi_shmem_update_flags
(
const
struct
device
*shmem,
67
uint32_t
mask,
uint32_t
val);
68
74
uint32_t
scmi_shmem_channel_status
(
const
struct
device
*shmem);
75
84
int
scmi_shmem_vendor_write_message
(
struct
scmi_shmem_layout
*
layout
);
85
94
int
scmi_shmem_vendor_read_message
(
const
struct
scmi_shmem_layout
*
layout
);
95
96
#endif
/* _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_SHMEM_H_ */
layout
Incorrect memory layout
Definition
bindesc.h:314
cpu.h
device.h
errno.h
System error numbers.
msg
static void msg(uint64_t c64)
Definition
main.c:17
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_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_write_message
int scmi_shmem_write_message(const struct device *shmem, struct scmi_message *msg)
Write a message in the SHMEM area.
scmi_shmem_read_message
int scmi_shmem_read_message(const struct device *shmem, struct scmi_message *msg)
Read a message from a SHMEM area.
uint32_t
__UINT32_TYPE__ uint32_t
Definition
stdint.h:90
device
Runtime device structure (in ROM) per driver instance.
Definition
device.h:504
scmi_message
SCMI message structure.
Definition
protocol.h:90
scmi_shmem_layout
Definition
shmem.h:22
scmi_shmem_layout::res1
volatile uint32_t res1[2]
Definition
shmem.h:25
scmi_shmem_layout::msg_hdr
volatile uint32_t msg_hdr
Definition
shmem.h:28
scmi_shmem_layout::chan_status
volatile uint32_t chan_status
Definition
shmem.h:24
scmi_shmem_layout::chan_flags
volatile uint32_t chan_flags
Definition
shmem.h:26
scmi_shmem_layout::res0
volatile uint32_t res0
Definition
shmem.h:23
scmi_shmem_layout::len
volatile uint32_t len
Definition
shmem.h:27
zephyr
drivers
firmware
scmi
shmem.h
Generated on Mon Apr 21 2025 11:55:48 for Zephyr API Documentation by
1.12.0