Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/powermac/macio.c
Show First 20 Lines • Show All 621 Lines • ▼ Show 20 Lines | macio_activate_resource(device_t bus, device_t child, int type, int rid, | ||||
void *p; | void *p; | ||||
sc = device_get_softc(bus); | sc = device_get_softc(bus); | ||||
if (type == SYS_RES_IRQ) | if (type == SYS_RES_IRQ) | ||||
return (bus_activate_resource(bus, type, rid, res)); | return (bus_activate_resource(bus, type, rid, res)); | ||||
if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { | if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { | ||||
p = pmap_mapdev((vm_offset_t)rman_get_start(res) + sc->sc_base, | p = pmap_mapdev((vm_paddr_t)rman_get_start(res) + sc->sc_base, | ||||
(vm_size_t)rman_get_size(res)); | (vm_size_t)rman_get_size(res)); | ||||
if (p == NULL) | if (p == NULL) | ||||
return (ENOMEM); | return (ENOMEM); | ||||
rman_set_virtual(res, p); | rman_set_virtual(res, p); | ||||
rman_set_bustag(res, &bs_le_tag); | rman_set_bustag(res, &bs_le_tag); | ||||
rman_set_bushandle(res, (u_long)p); | rman_set_bushandle(res, (u_long)p); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |