Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/fdt/simplebus.c
Show First 20 Lines • Show All 363 Lines • ▼ Show 20 Lines | for (j = 0; j < sc->nranges; j++) { | ||||
end -= sc->ranges[j].bus; | end -= sc->ranges[j].bus; | ||||
end += sc->ranges[j].host; | end += sc->ranges[j].host; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if (j == sc->nranges && sc->nranges != 0) { | if (j == sc->nranges && sc->nranges != 0) { | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(bus, "Could not map resource " | device_printf(bus, "Could not map resource " | ||||
"%#lx-%#lx\n", start, end); | "%#jx-%#jx\n", start, end); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
} | } | ||||
return (bus_generic_alloc_resource(bus, child, type, rid, start, end, | return (bus_generic_alloc_resource(bus, child, type, rid, start, end, | ||||
count, flags)); | count, flags)); | ||||
} | } | ||||
static int | static int | ||||
simplebus_print_res(struct simplebus_devinfo *di) | simplebus_print_res(struct simplebus_devinfo *di) | ||||
{ | { | ||||
int rv; | int rv; | ||||
if (di == NULL) | if (di == NULL) | ||||
return (0); | return (0); | ||||
rv = 0; | rv = 0; | ||||
rv += resource_list_print_type(&di->rl, "mem", SYS_RES_MEMORY, "%#lx"); | rv += resource_list_print_type(&di->rl, "mem", SYS_RES_MEMORY, "%#jx"); | ||||
rv += resource_list_print_type(&di->rl, "irq", SYS_RES_IRQ, "%ld"); | rv += resource_list_print_type(&di->rl, "irq", SYS_RES_IRQ, "%jd"); | ||||
return (rv); | return (rv); | ||||
} | } | ||||
static void | static void | ||||
simplebus_probe_nomatch(device_t bus, device_t child) | simplebus_probe_nomatch(device_t bus, device_t child) | ||||
{ | { | ||||
const char *name, *type, *compat; | const char *name, *type, *compat; | ||||
Show All 30 Lines |