MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nexus_deactivate_resource

Function nexus_deactivate_resource

freebsd/arm64/arm64/nexus.c:400–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400static int
401nexus_deactivate_resource(device_t bus, device_t child, int type, int rid,
402 struct resource *r)
403{
404 bus_size_t psize;
405 bus_space_handle_t vaddr;
406
407 if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) {
408 psize = (bus_size_t)rman_get_size(r);
409 vaddr = rman_get_bushandle(r);
410
411 if (vaddr != 0) {
412 bus_space_unmap(&memmap_bus, vaddr, psize);
413 rman_set_virtual(r, NULL);
414 rman_set_bushandle(r, 0);
415 }
416 } else if (type == SYS_RES_IRQ) {
417 intr_deactivate_irq(child, r);
418 }
419
420 return (rman_deactivate_resource(r));
421}
422
423#ifdef FDT
424static device_method_t nexus_fdt_methods[] = {

Callers

nothing calls this directly

Calls 7

rman_get_sizeFunction · 0.85
rman_get_bushandleFunction · 0.85
bus_space_unmapFunction · 0.85
rman_set_virtualFunction · 0.85
rman_set_bushandleFunction · 0.85
intr_deactivate_irqFunction · 0.85
rman_deactivate_resourceFunction · 0.85

Tested by

no test coverage detected