Zephyr API Documentation 4.3.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
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
27#define SCMI_SHMEM_CHAN_STATUS_BUSY_BIT BIT(0)
28#define SCMI_SHMEM_CHAN_FLAG_IRQ_BIT BIT(0)
29
31 volatile uint32_t res0;
33 volatile uint32_t res1[2];
35 volatile uint32_t len;
36 volatile uint32_t msg_hdr;
37};
38
39struct scmi_message;
40
50int scmi_shmem_write_message(const struct device *shmem,
51 struct scmi_message *msg);
52
62int scmi_shmem_read_message(const struct device *shmem,
63 struct scmi_message *msg);
64
74void scmi_shmem_update_flags(const struct device *shmem,
75 uint32_t mask, uint32_t val);
76
83
93
103
107
108#endif /* _INCLUDE_ZEPHYR_DRIVERS_FIRMWARE_SCMI_SHMEM_H_ */
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:513
SCMI message structure.
Definition protocol.h:110
Definition shmem.h:30
volatile uint32_t res1[2]
Definition shmem.h:33
volatile uint32_t msg_hdr
Definition shmem.h:36
volatile uint32_t chan_status
Definition shmem.h:32
volatile uint32_t chan_flags
Definition shmem.h:34
volatile uint32_t res0
Definition shmem.h:31
volatile uint32_t len
Definition shmem.h:35