| 453 | } |
| 454 | |
| 455 | static int |
| 456 | nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, |
| 457 | struct resource *r) |
| 458 | { |
| 459 | bus_space_handle_t vaddr; |
| 460 | bus_size_t psize; |
| 461 | |
| 462 | vaddr = rman_get_bushandle(r); |
| 463 | |
| 464 | if (type == SYS_RES_MEMORY && vaddr != 0) { |
| 465 | psize = (bus_size_t)rman_get_size(r); |
| 466 | bus_space_unmap(rman_get_bustag(r), vaddr, psize); |
| 467 | rman_set_virtual(r, NULL); |
| 468 | rman_set_bushandle(r, 0); |
| 469 | } else if (type == SYS_RES_IRQ) { |
| 470 | #ifdef INTRNG |
| 471 | mips_pic_deactivate_intr(child, r); |
| 472 | #endif |
| 473 | } |
| 474 | |
| 475 | return (rman_deactivate_resource(r)); |
| 476 | } |
| 477 | |
| 478 | static int |
| 479 | nexus_setup_intr(device_t dev, device_t child, struct resource *res, int flags, |
nothing calls this directly
no test coverage detected