Zephyr API Documentation 4.1.99
A Scalable Open Source RTOS
 4.1.99
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
23 volatile uint32_t res0;
25 volatile uint32_t res1[2];
27 volatile uint32_t len;
28 volatile uint32_t msg_hdr;
29};
30
31struct scmi_message;
32
42int scmi_shmem_write_message(const struct device *shmem,
43 struct scmi_message *msg);
44
54int scmi_shmem_read_message(const struct device *shmem,
55 struct scmi_message *msg);
56
66void scmi_shmem_update_flags(const struct device *shmem,
67 uint32_t mask, uint32_t val);
68
75
85
95
96#endif /* _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_SHMEM_H_ */
Incorrect memory layout
Definition bindesc.h:314
System error numbers.
uint32_t scmi_shmem_channel_status(const struct device *shmem)
Read a channel's status.
int scmi_shmem_vendor_read_message(const struct scmi_shmem_layout *layout)
Process vendor specific features when reading message.
void scmi_shmem_update_flags(const struct device *shmem, uint32_t mask, uint32_t val)
Update the channel flags.
int scmi_shmem_vendor_write_message(struct scmi_shmem_layout *layout)
Process vendor specific features when writing message.
int scmi_shmem_write_message(const struct device *shmem, struct scmi_message *msg)
Write a message in the SHMEM area.
int scmi_shmem_read_message(const struct device *shmem, struct scmi_message *msg)
Read a message from a SHMEM area.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition device.h:504
SCMI message structure.
Definition protocol.h:90
Definition shmem.h:22
volatile uint32_t res1[2]
Definition shmem.h:25
volatile uint32_t msg_hdr
Definition shmem.h:28
volatile uint32_t chan_status
Definition shmem.h:24
volatile uint32_t chan_flags
Definition shmem.h:26
volatile uint32_t res0
Definition shmem.h:23
volatile uint32_t len
Definition shmem.h:27