Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/arm64/gic_v3_fdt.c
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
/* | /* | ||||
* FDT glue. | * FDT glue. | ||||
*/ | */ | ||||
static int gic_v3_fdt_probe(device_t); | static int gic_v3_fdt_probe(device_t); | ||||
static int gic_v3_fdt_attach(device_t); | static int gic_v3_fdt_attach(device_t); | ||||
static struct resource *gic_v3_ofw_bus_alloc_res(device_t, device_t, int, int *, | static struct resource *gic_v3_ofw_bus_alloc_res(device_t, device_t, int, int *, | ||||
u_long, u_long, u_long, u_int); | rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
static const struct ofw_bus_devinfo *gic_v3_ofw_get_devinfo(device_t, device_t); | static const struct ofw_bus_devinfo *gic_v3_ofw_get_devinfo(device_t, device_t); | ||||
static device_method_t gic_v3_fdt_methods[] = { | static device_method_t gic_v3_fdt_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, gic_v3_fdt_probe), | DEVMETHOD(device_probe, gic_v3_fdt_probe), | ||||
DEVMETHOD(device_attach, gic_v3_fdt_attach), | DEVMETHOD(device_attach, gic_v3_fdt_attach), | ||||
/* Bus interface */ | /* Bus interface */ | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | gic_v3_ofw_get_devinfo(device_t bus __unused, device_t child) | ||||
struct gic_v3_ofw_devinfo *di; | struct gic_v3_ofw_devinfo *di; | ||||
di = device_get_ivars(child); | di = device_get_ivars(child); | ||||
return (&di->di_dinfo); | return (&di->di_dinfo); | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
gic_v3_ofw_bus_alloc_res(device_t bus, device_t child, int type, int *rid, | gic_v3_ofw_bus_alloc_res(device_t bus, 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) | ||||
{ | { | ||||
struct gic_v3_ofw_devinfo *di; | struct gic_v3_ofw_devinfo *di; | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
int ranges_len; | int ranges_len; | ||||
if ((start == 0UL) && (end == ~0UL)) { | if ((start == 0UL) && (end == ~0UL)) { | ||||
if ((di = device_get_ivars(child)) == NULL) | if ((di = device_get_ivars(child)) == NULL) | ||||
return (NULL); | return (NULL); | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |