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

Public APIs for the PCIe Controllers drivers. More...

#include <zephyr/types.h>
#include <zephyr/device.h>

Go to the source code of this file.

Data Structures

struct  pcie_ctrl_driver_api
 Structure providing callbacks to be implemented for devices that supports the PCI Express Controller API. More...
 
struct  pcie_ctrl_config
 Structure describing a device that supports the PCI Express Controller API. More...
 

Macros

#define PCIE_RANGE_FORMAT(node_id, idx)
 

Typedefs

typedef uint32_t(* pcie_ctrl_conf_read_t) (const struct device *dev, pcie_bdf_t bdf, unsigned int reg)
 Function called to read a 32-bit word from an endpoint's configuration space.
 
typedef void(* pcie_ctrl_conf_write_t) (const struct device *dev, pcie_bdf_t bdf, unsigned int reg, uint32_t data)
 Function called to write a 32-bit word to an endpoint's configuration space.
 
typedef bool(* pcie_ctrl_region_allocate_t) (const struct device *dev, pcie_bdf_t bdf, bool mem, bool mem64, size_t bar_size, uintptr_t *bar_bus_addr)
 Function called to allocate a memory region subset for an endpoint Base Address Register.
 
typedef bool(* pcie_ctrl_region_get_allocate_base_t) (const struct device *dev, pcie_bdf_t bdf, bool mem, bool mem64, size_t align, uintptr_t *bar_base_addr)
 Function called to get the current allocation base of a memory region subset for an endpoint Base Address Register.
 
typedef bool(* pcie_ctrl_region_translate_t) (const struct device *dev, pcie_bdf_t bdf, bool mem, bool mem64, uintptr_t bar_bus_addr, uintptr_t *bar_addr)
 Function called to translate an endpoint Base Address Register bus-centric address into Physical address.
 

Functions

uint32_t pcie_generic_ctrl_conf_read (mm_reg_t cfg_addr, pcie_bdf_t bdf, unsigned int reg)
 Read a 32-bit word from a Memory-Mapped endpoint's configuration space.
 
void pcie_generic_ctrl_conf_write (mm_reg_t cfg_addr, pcie_bdf_t bdf, unsigned int reg, uint32_t data)
 Write a 32-bit word to a Memory-Mapped endpoint's configuration space.
 
void pcie_generic_ctrl_enumerate (const struct device *dev, pcie_bdf_t bdf_start)
 Start PCIe Endpoints enumeration.
 
static uint32_t pcie_ctrl_conf_read (const struct device *dev, pcie_bdf_t bdf, unsigned int reg)
 Read a 32-bit word from an endpoint's configuration space.
 
static void pcie_ctrl_conf_write (const struct device *dev, pcie_bdf_t bdf, unsigned int reg, uint32_t data)
 Write a 32-bit word to an endpoint's configuration space.
 
static bool pcie_ctrl_region_allocate (const struct device *dev, pcie_bdf_t bdf, bool mem, bool mem64, size_t bar_size, uintptr_t *bar_bus_addr)
 Allocate a memory region subset for an endpoint Base Address Register.
 
static bool pcie_ctrl_region_get_allocate_base (const struct device *dev, pcie_bdf_t bdf, bool mem, bool mem64, size_t align, uintptr_t *bar_base_addr)
 Function called to get the current allocation base of a memory region subset for an endpoint Base Address Register.
 
static bool pcie_ctrl_region_translate (const struct device *dev, pcie_bdf_t bdf, bool mem, bool mem64, uintptr_t bar_bus_addr, uintptr_t *bar_addr)
 Translate an endpoint Base Address Register bus-centric address into Physical address.
 

Detailed Description

Public APIs for the PCIe Controllers drivers.