Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/nexus.c
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | static int nexus_setup_intr(device_t dev, device_t child, struct resource *res, | ||||
int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); | int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); | ||||
static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); | static int nexus_teardown_intr(device_t, device_t, struct resource *, void *); | ||||
#ifdef FDT | #ifdef FDT | ||||
static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, | static int nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, | ||||
int icells, pcell_t *intr); | int icells, pcell_t *intr); | ||||
#endif | #endif | ||||
static int nexus_map_msi(device_t, device_t, int, uint64_t *, uint32_t *); | |||||
static int nexus_alloc_msi(device_t, device_t, int, int *); | |||||
static int nexus_release_msi(device_t, device_t, int, int *); | |||||
static int nexus_alloc_msix(device_t, device_t, int *); | |||||
static int nexus_release_msix(device_t, device_t, int); | |||||
static device_method_t nexus_methods[] = { | static device_method_t nexus_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, nexus_probe), | DEVMETHOD(device_probe, nexus_probe), | ||||
DEVMETHOD(device_attach, nexus_attach), | DEVMETHOD(device_attach, nexus_attach), | ||||
/* Bus interface */ | /* Bus interface */ | ||||
DEVMETHOD(bus_print_child, nexus_print_child), | DEVMETHOD(bus_print_child, nexus_print_child), | ||||
DEVMETHOD(bus_add_child, nexus_add_child), | DEVMETHOD(bus_add_child, nexus_add_child), | ||||
DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), | DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), | ||||
DEVMETHOD(bus_activate_resource, nexus_activate_resource), | DEVMETHOD(bus_activate_resource, nexus_activate_resource), | ||||
DEVMETHOD(bus_config_intr, nexus_config_intr), | DEVMETHOD(bus_config_intr, nexus_config_intr), | ||||
DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), | DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), | ||||
DEVMETHOD(bus_setup_intr, nexus_setup_intr), | DEVMETHOD(bus_setup_intr, nexus_setup_intr), | ||||
DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), | DEVMETHOD(bus_teardown_intr, nexus_teardown_intr), | ||||
DEVMETHOD(bus_map_msi, nexus_map_msi), | |||||
DEVMETHOD(bus_alloc_msi, nexus_alloc_msi), | |||||
DEVMETHOD(bus_release_msi, nexus_release_msi), | |||||
DEVMETHOD(bus_alloc_msix, nexus_alloc_msix), | |||||
DEVMETHOD(bus_release_msix, nexus_release_msix), | |||||
#ifdef FDT | #ifdef FDT | ||||
DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), | DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), | ||||
#endif | #endif | ||||
{ 0, 0 } | { 0, 0 } | ||||
}; | }; | ||||
static devclass_t nexus_devclass; | static devclass_t nexus_devclass; | ||||
static driver_t nexus_driver = { | static driver_t nexus_driver = { | ||||
▲ Show 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | else | ||||
irq += 16; /* PPI */ | irq += 16; /* PPI */ | ||||
} else | } else | ||||
irq = intr[0]; | irq = intr[0]; | ||||
return (irq); | return (irq); | ||||
} | } | ||||
#endif | #endif | ||||
static int | |||||
nexus_map_msi(device_t dev, device_t child, int irq, | |||||
uint64_t *addr, uint32_t *data) | |||||
{ | |||||
return (arm_map_msi(child, irq, addr, data)); | |||||
} | |||||
static int | |||||
nexus_alloc_msi(device_t dev, device_t child, int count, int *irqs) | |||||
{ | |||||
return (arm_alloc_msi(child, count, irqs)); | |||||
} | |||||
static int | |||||
nexus_release_msi(device_t dev, device_t child, int count, int *irqs) | |||||
{ | |||||
return (arm_release_msi(child, count, irqs)); | |||||
} | |||||
static int | |||||
nexus_alloc_msix(device_t dev, device_t child, int *irq) | |||||
{ | |||||
return (arm_alloc_msix(child, irq)); | |||||
} | |||||
static int | |||||
nexus_release_msix(device_t dev, device_t child, int irq) | |||||
{ | |||||
return (arm_release_msix(child, irq)); | |||||
} |