Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/xscale/ixp425/ixp425.c
Context not available. | |||||
static struct resource * | static struct resource * | ||||
ixp425_alloc_resource(device_t dev, device_t child, int type, int *rid, | ixp425_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) | ||||
{ | { | ||||
struct ixp425_softc *sc = device_get_softc(dev); | struct ixp425_softc *sc = device_get_softc(dev); | ||||
const struct hwvtrans *vtrans; | const struct hwvtrans *vtrans; | ||||
Context not available. | |||||
(start - vtrans->hwbase); | (start - vtrans->hwbase); | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(child, | device_printf(child, | ||||
"%s: assign 0x%lx:0x%lx%s\n", | "%s: assign 0x%jx:0x%jx%s\n", | ||||
__func__, start, end - start, | __func__, start, end - start, | ||||
vtrans->isa4x ? " A4X" : | vtrans->isa4x ? " A4X" : | ||||
vtrans->isslow ? " SLOW" : ""); | vtrans->isslow ? " SLOW" : ""); | ||||
Context not available. | |||||
vtrans = gethwvtrans(start, end - start); | vtrans = gethwvtrans(start, end - start); | ||||
if (vtrans == NULL) { | if (vtrans == NULL) { | ||||
/* likely means above table needs to be updated */ | /* likely means above table needs to be updated */ | ||||
device_printf(child, "%s: no mapping for 0x%lx:0x%lx\n", | device_printf(child, "%s: no mapping for 0x%jx:0x%jx\n", | ||||
__func__, start, end - start); | __func__, start, end - start); | ||||
return NULL; | return NULL; | ||||
} | } | ||||
Context not available. | |||||
rv = rman_reserve_resource(&sc->sc_mem_rman, start, end, | rv = rman_reserve_resource(&sc->sc_mem_rman, start, end, | ||||
end - start, flags, child); | end - start, flags, child); | ||||
if (rv == NULL) { | if (rv == NULL) { | ||||
device_printf(child, "%s: cannot reserve 0x%lx:0x%lx\n", | device_printf(child, "%s: cannot reserve 0x%jx:0x%jx\n", | ||||
__func__, start, end - start); | __func__, start, end - start); | ||||
return NULL; | return NULL; | ||||
} | } | ||||
Context not available. | |||||
if (type == SYS_RES_MEMORY) { | if (type == SYS_RES_MEMORY) { | ||||
vtrans = gethwvtrans(rman_get_start(r), rman_get_size(r)); | vtrans = gethwvtrans(rman_get_start(r), rman_get_size(r)); | ||||
if (vtrans == NULL) { /* NB: should not happen */ | if (vtrans == NULL) { /* NB: should not happen */ | ||||
device_printf(child, "%s: no mapping for 0x%lx:0x%lx\n", | device_printf(child, "%s: no mapping for 0x%jx:0x%jx\n", | ||||
__func__, rman_get_start(r), rman_get_size(r)); | __func__, rman_get_start(r), rman_get_size(r)); | ||||
return (ENOENT); | return (ENOENT); | ||||
} | } | ||||
Context not available. |