Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pcib_private.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | struct pcib_host_resources { | ||||
struct resource_list hr_rl; | struct resource_list hr_rl; | ||||
}; | }; | ||||
int pcib_host_res_init(device_t pcib, | int pcib_host_res_init(device_t pcib, | ||||
struct pcib_host_resources *hr); | struct pcib_host_resources *hr); | ||||
int pcib_host_res_free(device_t pcib, | int pcib_host_res_free(device_t pcib, | ||||
struct pcib_host_resources *hr); | struct pcib_host_resources *hr); | ||||
int pcib_host_res_decodes(struct pcib_host_resources *hr, int type, | int pcib_host_res_decodes(struct pcib_host_resources *hr, int type, | ||||
u_long start, u_long end, u_int flags); | rman_res_t start, rman_res_t end, u_int flags); | ||||
struct resource *pcib_host_res_alloc(struct pcib_host_resources *hr, | struct resource *pcib_host_res_alloc(struct pcib_host_resources *hr, | ||||
device_t dev, int type, int *rid, u_long start, u_long end, | device_t dev, int type, int *rid, rman_res_t start, | ||||
u_long count, u_int flags); | rman_res_t end, rman_res_t count, u_int flags); | ||||
int pcib_host_res_adjust(struct pcib_host_resources *hr, | int pcib_host_res_adjust(struct pcib_host_resources *hr, | ||||
device_t dev, int type, struct resource *r, u_long start, | device_t dev, int type, struct resource *r, rman_res_t start, | ||||
u_long end); | rman_res_t end); | ||||
#endif | #endif | ||||
/* | /* | ||||
* Export portions of generic PCI:PCI bridge support so that it can be | * Export portions of generic PCI:PCI bridge support so that it can be | ||||
* used by subclasses. | * used by subclasses. | ||||
*/ | */ | ||||
DECLARE_CLASS(pcib_driver); | DECLARE_CLASS(pcib_driver); | ||||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
#define PCIB_SUPPORTED_ARI_VER 1 | #define PCIB_SUPPORTED_ARI_VER 1 | ||||
typedef uint32_t pci_read_config_fn(int b, int s, int f, int reg, int width); | typedef uint32_t pci_read_config_fn(int b, int s, int f, int reg, int width); | ||||
int host_pcib_get_busno(pci_read_config_fn read_config, int bus, | int host_pcib_get_busno(pci_read_config_fn read_config, int bus, | ||||
int slot, int func, uint8_t *busnum); | int slot, int func, uint8_t *busnum); | ||||
#if defined(NEW_PCIB) && defined(PCI_RES_BUS) | #if defined(NEW_PCIB) && defined(PCI_RES_BUS) | ||||
struct resource *pci_domain_alloc_bus(int domain, device_t dev, int *rid, | struct resource *pci_domain_alloc_bus(int domain, device_t dev, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags); | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); | ||||
int pci_domain_adjust_bus(int domain, device_t dev, | int pci_domain_adjust_bus(int domain, device_t dev, | ||||
struct resource *r, u_long start, u_long end); | struct resource *r, rman_res_t start, rman_res_t end); | ||||
int pci_domain_release_bus(int domain, device_t dev, int rid, | int pci_domain_release_bus(int domain, device_t dev, int rid, | ||||
struct resource *r); | struct resource *r); | ||||
struct resource *pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, | struct resource *pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, | ||||
int *rid, u_long start, u_long end, u_long count, | int *rid, rman_res_t start, rman_res_t end, rman_res_t count, | ||||
u_int flags); | u_int flags); | ||||
void pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, | void pcib_setup_secbus(device_t dev, struct pcib_secbus *bus, | ||||
int min_count); | int min_count); | ||||
#endif | #endif | ||||
int pcib_attach(device_t dev); | int pcib_attach(device_t dev); | ||||
void pcib_attach_common(device_t dev); | void pcib_attach_common(device_t dev); | ||||
void pcib_bridge_init(device_t dev); | void pcib_bridge_init(device_t dev); | ||||
#ifdef NEW_PCIB | #ifdef NEW_PCIB | ||||
const char *pcib_child_name(device_t child); | const char *pcib_child_name(device_t child); | ||||
#endif | #endif | ||||
int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); | int pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result); | ||||
int pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); | int pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); | ||||
struct resource *pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, | struct resource *pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags); | rman_res_t start, rman_res_t end, | ||||
rman_res_t count, u_int flags); | |||||
#ifdef NEW_PCIB | #ifdef NEW_PCIB | ||||
int pcib_adjust_resource(device_t bus, device_t child, int type, | int pcib_adjust_resource(device_t bus, device_t child, int type, | ||||
struct resource *r, u_long start, u_long end); | struct resource *r, rman_res_t start, rman_res_t end); | ||||
int pcib_release_resource(device_t dev, device_t child, int type, int rid, | int pcib_release_resource(device_t dev, device_t child, int type, int rid, | ||||
struct resource *r); | struct resource *r); | ||||
#endif | #endif | ||||
int pcib_maxslots(device_t dev); | int pcib_maxslots(device_t dev); | ||||
int pcib_maxfuncs(device_t dev); | int pcib_maxfuncs(device_t dev); | ||||
int pcib_route_interrupt(device_t pcib, device_t dev, int pin); | int pcib_route_interrupt(device_t pcib, device_t dev, int pin); | ||||
int pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); | int pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); | ||||
int pcib_release_msi(device_t pcib, device_t dev, int count, int *irqs); | int pcib_release_msi(device_t pcib, device_t dev, int count, int *irqs); | ||||
int pcib_alloc_msix(device_t pcib, device_t dev, int *irq); | int pcib_alloc_msix(device_t pcib, device_t dev, int *irq); | ||||
int pcib_release_msix(device_t pcib, device_t dev, int irq); | int pcib_release_msix(device_t pcib, device_t dev, int irq); | ||||
int pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); | int pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *data); | ||||
uint16_t pcib_get_rid(device_t pcib, device_t dev); | uint16_t pcib_get_rid(device_t pcib, device_t dev); | ||||
void pcib_decode_rid(device_t pcib, uint16_t rid, int *bus, | void pcib_decode_rid(device_t pcib, uint16_t rid, int *bus, | ||||
int *slot, int *func); | int *slot, int *func); | ||||
#endif | #endif |