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

Microchip eSPI Driver Header. More...

#include <stddef.h>
#include <stdint.h>
#include <zephyr/drivers/espi.h>

Go to the source code of this file.

Functions

int mchp_xec_espi_sram_bar_get (const struct device *dev, uint8_t id, uint8_t **buf, size_t *size)
 Get the EC buffer backing an eSPI SRAM BAR.

Detailed Description

Microchip eSPI Driver Header.

This header provides conditional inclusion of Microchip eSPI controller extension to types from espi.h

Function Documentation

◆ mchp_xec_espi_sram_bar_get()

int mchp_xec_espi_sram_bar_get ( const struct device * dev,
uint8_t id,
uint8_t ** buf,
size_t * size )

Get the EC buffer backing an eSPI SRAM BAR.

The driver allocates the EC SRAM region of each SRAM BAR enabled in the "microchip,xec-espi-sram-bar" devicetree node. Host memory cycles to the BAR host address read and write this buffer.

Parameters
devPointer to the eSPI device
idSRAM BAR index (0 or 1)
bufPointer to store the EC buffer address
sizePointer to store the buffer size in bytes
Return values
0success
-EINVALif dev, buf or size is NULL
-ENODEVif SRAM BAR id is not enabled in devicetree