| 350 | } |
| 351 | |
| 352 | static int |
| 353 | versatile_pci_activate_resource(device_t bus, device_t child, int type, int rid, |
| 354 | struct resource *r) |
| 355 | { |
| 356 | vm_offset_t vaddr; |
| 357 | int res; |
| 358 | |
| 359 | switch(type) { |
| 360 | case SYS_RES_MEMORY: |
| 361 | case SYS_RES_IOPORT: |
| 362 | vaddr = (vm_offset_t)pmap_mapdev(rman_get_start(r), |
| 363 | rman_get_size(r)); |
| 364 | rman_set_bushandle(r, vaddr); |
| 365 | rman_set_bustag(r, fdtbus_bs_tag); |
| 366 | res = rman_activate_resource(r); |
| 367 | break; |
| 368 | case SYS_RES_IRQ: |
| 369 | res = (BUS_ACTIVATE_RESOURCE(device_get_parent(bus), |
| 370 | child, type, rid, r)); |
| 371 | break; |
| 372 | default: |
| 373 | res = ENXIO; |
| 374 | break; |
| 375 | } |
| 376 | |
| 377 | return (res); |
| 378 | } |
| 379 | |
| 380 | static int |
| 381 | versatile_pci_setup_intr(device_t bus, device_t child, struct resource *ires, |
nothing calls this directly
no test coverage detected