34#ifndef __PCI_HOST_GENERIC_H_
35#define __PCI_HOST_GENERIC_H_
40#define PCIE_BUS_SHIFT 20
41#define PCIE_SLOT_SHIFT 15
42#define PCIE_FUNC_SHIFT 12
43#define PCIE_BUS_MASK 0xFF
44#define PCIE_SLOT_MASK 0x1F
45#define PCIE_FUNC_MASK 0x07
46#define PCIE_REG_MASK 0xFFF
48#define PCIE_ADDR_OFFSET(bus, slot, func, reg) \
49 ((((bus) & PCIE_BUS_MASK) << PCIE_BUS_SHIFT) | \
50 (((slot) & PCIE_SLOT_MASK) << PCIE_SLOT_SHIFT) | \
51 (((func) & PCIE_FUNC_MASK) << PCIE_FUNC_SHIFT) | \
52 ((reg) & PCIE_REG_MASK))
54#define MAX_RANGES_TUPLES 16
55#define MIN_RANGES_TUPLES 2
62#define FLAG_TYPE(x) ((x) & FLAG_TYPE_MASK)
63#define FLAG_TYPE_MASK 0x3
64#define FLAG_TYPE_INVALID 0x0
65#define FLAG_TYPE_IO 0x1
66#define FLAG_TYPE_MEM 0x2
67#define FLAG_TYPE_PMEM 0x3
84 bus_space_handle_t
bsh;
86 bus_space_handle_t
ioh;
92#define PCIE_ECAM_DESIGNWARE_QUIRK (1 << 0)
98 int *, rman_res_t, rman_res_t, rman_res_t, u_int);
int pci_host_generic_core_attach(device_t)
int pci_host_generic_core_release_resource(device_t, device_t, int, int, struct resource *)
struct resource * pci_host_generic_core_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int)
#define MAX_RANGES_TUPLES
DECLARE_CLASS(generic_pcie_core_driver)
struct pcie_range ranges[MAX_RANGES_TUPLES]