13#ifndef ZEPHYR_INCLUDE_DRIVERS_PCIE_EP_H_
14#define ZEPHYR_INCLUDE_DRIVERS_PCIE_EP_H_
154 return api->
map_addr(dev, pcie_addr, mapped_addr, size, ob_mem_type);
197 return api->
raise_irq(dev, irq_type, irq_num);
259 return api->
dma_xfer(dev, mapped_addr, local_addr, size, dir);
void
Definition: eswifi_shell.c:15
#define ENOTSUP
Definition: errno.h:115
static void pcie_ep_unmap_addr(const struct device *dev, uint64_t mapped_addr)
Remove mapping to PCIe outbound region.
Definition: pcie_ep.h:170
static int pcie_ep_register_reset_cb(const struct device *dev, enum pcie_reset reset, pcie_ep_reset_callback_t cb, void *arg)
Register callback function for reset interrupts.
Definition: pcie_ep.h:215
pcie_reset
Definition: pcie_ep.h:38
@ PCIE_RESET_MAX
Definition: pcie_ep.h:42
@ PCIE_PERST
Definition: pcie_ep.h:39
@ PCIE_FLR
Definition: pcie_ep.h:41
@ PCIE_PERST_INB
Definition: pcie_ep.h:40
static int pcie_ep_map_addr(const struct device *dev, uint64_t pcie_addr, uint64_t *mapped_addr, uint32_t size, enum pcie_ob_mem_type ob_mem_type)
Map a host memory buffer to PCIe outbound region.
Definition: pcie_ep.h:146
static int pcie_ep_dma_xfer(const struct device *dev, uint64_t mapped_addr, uintptr_t local_addr, uint32_t size, const enum xfer_direction dir)
Data transfer between mapped Host memory and device memory with "System DMA". The term "System DMA" i...
Definition: pcie_ep.h:250
static void pcie_ep_conf_write(const struct device *dev, uint32_t offset, uint32_t data)
Write PCIe EP configuration space.
Definition: pcie_ep.h:112
pcie_ob_mem_type
Definition: pcie_ep.h:21
@ PCIE_OB_HIGHMEM
Definition: pcie_ep.h:24
@ PCIE_OB_ANYMEM
Definition: pcie_ep.h:22
@ PCIE_OB_LOWMEM
Definition: pcie_ep.h:23
pci_ep_irq_type
Definition: pcie_ep.h:27
@ PCIE_EP_IRQ_MSI
Definition: pcie_ep.h:29
@ PCIE_EP_IRQ_MSIX
Definition: pcie_ep.h:30
@ PCIE_EP_IRQ_LEGACY
Definition: pcie_ep.h:28
int pcie_ep_xfer_data_memcpy(const struct device *dev, uint64_t pcie_addr, uintptr_t *local_addr, uint32_t size, enum pcie_ob_mem_type ob_mem_type, enum xfer_direction dir)
Data transfer using memcpy.
xfer_direction
Definition: pcie_ep.h:33
@ DEVICE_TO_HOST
Definition: pcie_ep.h:35
@ HOST_TO_DEVICE
Definition: pcie_ep.h:34
int pcie_ep_xfer_data_dma(const struct device *dev, uint64_t pcie_addr, uintptr_t *local_addr, uint32_t size, enum pcie_ob_mem_type ob_mem_type, enum xfer_direction dir)
Data transfer using system DMA.
static int pcie_ep_conf_read(const struct device *dev, uint32_t offset, uint32_t *data)
Read PCIe EP configuration space.
Definition: pcie_ep.h:91
static int pcie_ep_raise_irq(const struct device *dev, enum pci_ep_irq_type irq_type, uint32_t irq_num)
Raise interrupt to Host.
Definition: pcie_ep.h:191
void(* pcie_ep_reset_callback_t)(void *arg)
Callback API for PCIe reset interrupts.
Definition: pcie_ep.h:57
__UINT32_TYPE__ uint32_t
Definition: stdint.h:60
__UINT64_TYPE__ uint64_t
Definition: stdint.h:61
__UINTPTR_TYPE__ uintptr_t
Definition: stdint.h:75
Runtime device structure (in ROM) per driver instance.
Definition: device.h:367
const void * api
Definition: device.h:373
int(* map_addr)(const struct device *dev, uint64_t pcie_addr, uint64_t *mapped_addr, uint32_t size, enum pcie_ob_mem_type ob_mem_type)
Definition: pcie_ep.h:64
void(* unmap_addr)(const struct device *dev, uint64_t mapped_addr)
Definition: pcie_ep.h:67
int(* raise_irq)(const struct device *dev, enum pci_ep_irq_type irq_type, uint32_t irq_num)
Definition: pcie_ep.h:68
int(* conf_read)(const struct device *dev, uint32_t offset, uint32_t *data)
Definition: pcie_ep.h:60
int(* dma_xfer)(const struct device *dev, uint64_t mapped_addr, uintptr_t local_addr, uint32_t size, enum xfer_direction dir)
Definition: pcie_ep.h:74
void(* conf_write)(const struct device *dev, uint32_t offset, uint32_t data)
Definition: pcie_ep.h:62
int(* register_reset_cb)(const struct device *dev, enum pcie_reset reset, pcie_ep_reset_callback_t cb, void *arg)
Definition: pcie_ep.h:71
static fdata_t data[2]
Definition: test_fifo_contexts.c:15