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

Function versatile_pci_activate_resource

freebsd/arm/versatile/versatile_pci.c:352–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352static int
353versatile_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
380static int
381versatile_pci_setup_intr(device_t bus, device_t child, struct resource *ires,

Callers

nothing calls this directly

Calls 7

rman_get_startFunction · 0.85
rman_get_sizeFunction · 0.85
rman_set_bushandleFunction · 0.85
rman_set_bustagFunction · 0.85
rman_activate_resourceFunction · 0.85
device_get_parentFunction · 0.85
pmap_mapdevFunction · 0.50

Tested by

no test coverage detected