11#ifndef __PCI_ENDPOINT_H__
12#define __PCI_ENDPOINT_H__
141 unsigned *out_irq_nr);
144 unsigned irq_nr,
int bar_idx,
rt_off_t offset);
146 unsigned *out_irq_nr);
171 unsigned *out_irq_nr);
174 unsigned irq_nr,
int bar_idx,
rt_off_t offset);
176 unsigned *out_irq_nr);
rt_err_t rt_pci_ep_raise_irq(struct rt_pci_ep *ep, rt_uint8_t func_no, enum rt_pci_ep_irq type, unsigned irq)
rt_err_t rt_pci_ep_register(struct rt_pci_ep *ep)
rt_err_t rt_pci_ep_add_epf(struct rt_pci_ep *ep, struct rt_pci_epf *epf)
rt_err_t rt_pci_ep_mem_init(struct rt_pci_ep *ep, rt_ubase_t cpu_addr, rt_size_t size, rt_size_t page_size)
rt_err_t rt_pci_ep_mem_array_init(struct rt_pci_ep *ep, struct rt_pci_ep_mem *mems, rt_size_t mems_nr)
rt_err_t rt_pci_ep_start(struct rt_pci_ep *ep)
rt_err_t rt_pci_ep_unmap_addr(struct rt_pci_ep *ep, rt_uint8_t func_no, rt_ubase_t addr)
rt_err_t rt_pci_ep_stop(struct rt_pci_ep *ep)
rt_err_t rt_pci_ep_set_bar(struct rt_pci_ep *ep, rt_uint8_t func_no, struct rt_pci_ep_bar *bar, int bar_idx)
rt_err_t rt_pci_ep_set_msix(struct rt_pci_ep *ep, rt_uint8_t func_no, unsigned irq_nr, int bar_idx, rt_off_t offset)
rt_err_t rt_pci_ep_map_addr(struct rt_pci_ep *ep, rt_uint8_t func_no, rt_ubase_t addr, rt_uint64_t pci_addr, rt_size_t size)
void rt_pci_ep_mem_free(struct rt_pci_ep *ep, void *vaddr, rt_ubase_t cpu_addr, rt_size_t size)
struct rt_pci_ep * rt_pci_ep_get(const char *name)
rt_err_t rt_pci_ep_remove_epf(struct rt_pci_ep *ep, struct rt_pci_epf *epf)
rt_err_t rt_pci_ep_get_msi(struct rt_pci_ep *ep, rt_uint8_t func_no, unsigned *out_irq_nr)
rt_err_t rt_pci_ep_write_header(struct rt_pci_ep *ep, rt_uint8_t func_no, struct rt_pci_ep_header *hdr)
rt_err_t rt_pci_ep_clear_bar(struct rt_pci_ep *ep, rt_uint8_t func_no, struct rt_pci_ep_bar *bar, int bar_idx)
void * rt_pci_ep_mem_alloc(struct rt_pci_ep *ep, rt_ubase_t *out_cpu_addr, rt_size_t size)
rt_err_t rt_pci_ep_unregister(struct rt_pci_ep *ep)
void rt_pci_ep_put(struct rt_pci_ep *ep)
rt_err_t rt_pci_ep_set_msi(struct rt_pci_ep *ep, rt_uint8_t func_no, unsigned irq_nr)
rt_err_t rt_pci_ep_get_msix(struct rt_pci_ep *ep, rt_uint8_t func_no, unsigned *out_irq_nr)
unsigned short rt_uint16_t
struct rt_list_node rt_list_t
unsigned long long rt_uint64_t
struct rt_pci_bus_resource bus
rt_uint32_t msg_addr_upper
rt_uint32_t msg_addr_lower
rt_err_t(* start)(struct rt_pci_ep *ep)
rt_err_t(* raise_irq)(struct rt_pci_ep *ep, rt_uint8_t func_no, enum rt_pci_ep_irq type, unsigned irq)
rt_err_t(* map_addr)(struct rt_pci_ep *ep, rt_uint8_t func_no, rt_ubase_t addr, rt_uint64_t pci_addr, rt_size_t size)
rt_err_t(* unmap_addr)(struct rt_pci_ep *ep, rt_uint8_t func_no, rt_ubase_t addr)
rt_err_t(* set_bar)(struct rt_pci_ep *ep, rt_uint8_t func_no, struct rt_pci_ep_bar *bar, int bar_idx)
rt_err_t(* get_msix)(struct rt_pci_ep *ep, rt_uint8_t func_no, unsigned *out_irq_nr)
rt_err_t(* clear_bar)(struct rt_pci_ep *ep, rt_uint8_t func_no, struct rt_pci_ep_bar *bar, int bar_idx)
rt_err_t(* set_msi)(struct rt_pci_ep *ep, rt_uint8_t func_no, unsigned irq_nr)
rt_err_t(* get_msi)(struct rt_pci_ep *ep, rt_uint8_t func_no, unsigned *out_irq_nr)
rt_err_t(* set_msix)(struct rt_pci_ep *ep, rt_uint8_t func_no, unsigned irq_nr, int bar_idx, rt_off_t offset)
rt_err_t(* write_header)(struct rt_pci_ep *ep, rt_uint8_t func_no, struct rt_pci_ep_header *hdr)
rt_err_t(* stop)(struct rt_pci_ep *ep)
struct rt_pci_ep_mem * mems
const struct rt_device * rc_dev
RT_BITMAP_DECLARE(functions_map, 8)
const struct rt_pci_ep_ops * ops
struct rt_pci_ep_bar bar[PCI_STD_NUM_BARS]
rt_uint16_t msix_interrupts
struct rt_pci_ep_header * header
rt_uint8_t msi_interrupts