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

Function bcm_mips_detach

freebsd/mips/broadcom/bcm_mips.c:395–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395int
396bcm_mips_detach(device_t dev)
397{
398 struct bcm_mips_softc *sc;
399
400 sc = device_get_softc(dev);
401
402 /* Deregister PIC before performing any other cleanup */
403 intr_pic_deregister(dev, 0);
404
405 /* Deregister all interrupt sources */
406 for (size_t i = 0; i < nitems(sc->isrcs); i++)
407 intr_isrc_deregister(&sc->isrcs[i].isrc);
408
409 /* Free our MIPS CPU interrupt handler state */
410 for (u_int i = 0; i < sc->num_cpuirqs; i++)
411 bcm_mips_fini_cpuirq(sc, &sc->cpuirqs[i]);
412
413 return (0);
414}
415
416/* PIC_MAP_INTR() */
417static int

Callers 2

bcm_bmips_detachFunction · 0.85
bcm_mips74k_detachFunction · 0.85

Calls 4

device_get_softcFunction · 0.85
intr_pic_deregisterFunction · 0.85
intr_isrc_deregisterFunction · 0.85
bcm_mips_fini_cpuirqFunction · 0.85

Tested by

no test coverage detected