Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/rmi/iodi.c
Context not available. | |||||
static struct resource * | static struct resource * | ||||
iodi_alloc_resource(device_t, device_t, int, int *, | iodi_alloc_resource(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 int | static int | ||||
iodi_activate_resource(device_t, device_t, int, int, | iodi_activate_resource(device_t, device_t, int, int, | ||||
Context not available. | |||||
static struct resource * | static struct resource * | ||||
iodi_alloc_resource(device_t bus, device_t child, int type, int *rid, | iodi_alloc_resource(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 resource *res = malloc(sizeof(*res), M_DEVBUF, M_WAITOK); | struct resource *res = malloc(sizeof(*res), M_DEVBUF, M_WAITOK); | ||||
const char *name = device_get_name(child); | const char *name = device_get_name(child); | ||||
Context not available. | |||||
#ifdef DEBUG | #ifdef DEBUG | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
device_printf(bus, "IRQ resource - for %s %lx-%lx\n", | device_printf(bus, "IRQ resource - for %s %jx-%jx\n", | ||||
device_get_nameunit(child), start, end); | device_get_nameunit(child), start, end); | ||||
break; | break; | ||||
case SYS_RES_IOPORT: | case SYS_RES_IOPORT: | ||||
device_printf(bus, "IOPORT resource - for %s %lx-%lx\n", | device_printf(bus, "IOPORT resource - for %s %jx-%jx\n", | ||||
device_get_nameunit(child), start, end); | device_get_nameunit(child), start, end); | ||||
break; | break; | ||||
case SYS_RES_MEMORY: | case SYS_RES_MEMORY: | ||||
device_printf(bus, "MEMORY resource - for %s %lx-%lx\n", | device_printf(bus, "MEMORY resource - for %s %jx-%jx\n", | ||||
device_get_nameunit(child), start, end); | device_get_nameunit(child), start, end); | ||||
break; | break; | ||||
} | } | ||||
Context not available. |