Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
espi_saf.h File Reference

Public APIs for eSPI driver. More...

#include <zephyr/sys/__assert.h>
#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/syscalls/espi_saf.h>

Go to the source code of this file.

Data Structures

struct  espi_saf_cfg
 eSPI SAF configuration parameters More...
struct  espi_saf_packet
 eSPI SAF transaction packet format More...
struct  espi_saf_driver_api
  Driver Operations eSPI SAF driver operations More...

Typedefs

typedef int(* espi_saf_api_config) (const struct device *dev, const struct espi_saf_cfg *cfg)
 Callback API to configure the eSPI SAF controller.
typedef int(* espi_saf_api_set_protection_regions) (const struct device *dev, const struct espi_saf_protection *pr)
 Callback API to set one or more SAF protection regions.
typedef int(* espi_saf_api_activate) (const struct device *dev)
 Callback API to activate the SAF block.
typedef bool(* espi_saf_api_get_channel_status) (const struct device *dev)
 Callback API to query if SAF is ready.
typedef int(* espi_saf_api_flash_read) (const struct device *dev, struct espi_saf_packet *pckt)
 Callback API to send a read request for slave attached flash.
typedef int(* espi_saf_api_flash_write) (const struct device *dev, struct espi_saf_packet *pckt)
 Callback API to send a write request for slave attached flash.
typedef int(* espi_saf_api_flash_erase) (const struct device *dev, struct espi_saf_packet *pckt)
 Callback API to send an erase request for slave attached flash.
typedef int(* espi_saf_api_flash_unsuccess) (const struct device *dev, struct espi_saf_packet *pckt)
 Callback API to respond unsuccessful completion for slave attached flash.
typedef int(* espi_saf_api_manage_callback) (const struct device *dev, struct espi_callback *callback, bool set)
 Callback API to manage (add or remove) application callbacks.

Enumerations

enum  espi_taf_event { ESPI_TAF_EVENT_NO_REQUEST = 0 , ESPI_TAF_EVENT_HOST_REQUEST , ESPI_TAF_EVENT_EC0_REQUEST , ESPI_TAF_EVENT_MAX_REQUEST }
 eSPI TAF notification type. More...

Functions

int espi_saf_config (const struct device *dev, const struct espi_saf_cfg *cfg)
 Configure operation of an eSPI controller.
int espi_saf_set_protection_regions (const struct device *dev, const struct espi_saf_protection *pr)
 Set one or more SAF protection regions.
int espi_saf_activate (const struct device *dev)
 Activate SAF block.
bool espi_saf_get_channel_status (const struct device *dev)
 Query to see if SAF is ready.
int espi_saf_flash_read (const struct device *dev, struct espi_saf_packet *pckt)
 Sends a read request packet for slave attached flash.
int espi_saf_flash_write (const struct device *dev, struct espi_saf_packet *pckt)
 Sends a write request packet for slave attached flash.
int espi_saf_flash_erase (const struct device *dev, struct espi_saf_packet *pckt)
 Sends an erase request packet for slave attached flash.
int espi_saf_flash_unsuccess (const struct device *dev, struct espi_saf_packet *pckt)
 Response unsuccessful completion for slave attached flash.
static void espi_saf_init_callback (struct espi_callback *callback, espi_callback_handler_t handler, enum espi_bus_event evt_type)
 Callback model.
static int espi_saf_add_callback (const struct device *dev, struct espi_callback *callback)
 Add an application callback.
static int espi_saf_remove_callback (const struct device *dev, struct espi_callback *callback)
 Remove an application callback.

Detailed Description

Public APIs for eSPI driver.