| 398 | } |
| 399 | |
| 400 | static int |
| 401 | nexus_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 |
| 424 | static device_method_t nexus_fdt_methods[] = { |
nothing calls this directly
no test coverage detected