7#ifndef ZEPHYR_INCLUDE_DRIVERS_ESPI_SPI_EMUL_H_
8#define ZEPHYR_INCLUDE_DRIVERS_ESPI_SPI_EMUL_H_
33#define EMUL_ESPI_HOST_CHIPSEL 0
65#ifdef CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION
73typedef uintptr_t (*emul_espi_api_get_acpi_shm)(
const struct emul *target);
87typedef struct espi_emul *(*emul_find_emul)(
const struct device *dev,
unsigned int chipsel);
105#ifdef CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION
106 emul_espi_api_get_acpi_shm get_acpi_shm;
166#ifdef CONFIG_ESPI_PERIPHERAL_ACPI_SHM_REGION
Public APIs for eSPI driver.
int(* emul_espi_api_get_vw)(const struct emul *target, enum espi_vwire_signal vw, uint8_t *level)
Passes eSPI virtual wires get request (virtual wire packet) to the emulator.
Definition espi_emul.h:62
int emul_espi_host_port80_write(const struct device *espi_dev, uint32_t data)
Perform port80 write on the emulated host side, which will trigger a proper event(and callbacks) on t...
int(* emul_trigger_event)(const struct device *dev, struct espi_event *evt)
Triggers an event on the emulator of eSPI controller side which causes calling specific callbacks.
Definition espi_emul.h:99
int emul_espi_host_send_vw(const struct device *espi_dev, enum espi_vwire_signal vw, uint8_t level)
Sets the eSPI virtual wire on the host side, which will trigger a proper event(and callbacks) on the ...
struct espi_emul *(* emul_find_emul)(const struct device *dev, unsigned int chipsel)
Find an emulator present on a eSPI bus.
Definition espi_emul.h:87
int espi_emul_register(const struct device *dev, struct espi_emul *emul)
Register an emulated device on the controller.
int(* emul_espi_api_set_vw)(const struct emul *target, enum espi_vwire_signal vw, uint8_t level)
Passes eSPI virtual wires set request (virtual wire packet) to the emulator.
Definition espi_emul.h:48
espi_vwire_signal
eSPI system platform signals that can be send or receive through virtual wire channel
Definition espi.h:223
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINTPTR_TYPE__ uintptr_t
Definition stdint.h:105
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:411
Definition of the eSPI device emulator API.
Definition espi_emul.h:102
emul_espi_api_set_vw set_vw
Definition espi_emul.h:103
emul_espi_api_get_vw get_vw
Definition espi_emul.h:104
Definition of the eSPI controller emulator API.
Definition espi_emul.h:122
emul_trigger_event trigger_event
Definition espi_emul.h:128
struct espi_driver_api espi_api
Definition espi_emul.h:126
emul_find_emul find_emul
Definition espi_emul.h:129
An emulator instance - represents the target emulated device/peripheral that is interacted with throu...
Definition emul.h:82
Node in a linked list of emulators for eSPI devices.
Definition espi_emul.h:111
const struct emul_espi_device_api * api
API provided for this device.
Definition espi_emul.h:116
const struct emul * target
Target emulator - REQUIRED for all emulated bus nodes of any type.
Definition espi_emul.h:114
uint16_t chipsel
eSPI chip-select of the emulated device
Definition espi_emul.h:118
sys_snode_t node
Definition espi_emul.h:112
eSPI event
Definition espi.h:347