Lines Matching defs:amdpm_sc
196 struct amdpm_softc *amdpm_sc = device_get_softc(dev);
206 amdpm_sc->rid = AMDPCI_PMBASE;
208 amdpm_sc->rid = NFPCI_PMBASE;
209 amdpm_sc->res = bus_alloc_resource_any(dev, SYS_RES_IOPORT,
210 &amdpm_sc->rid, RF_ACTIVE);
212 if (amdpm_sc->res == NULL) {
217 mtx_init(&amdpm_sc->lock, device_get_nameunit(dev), "amdpm", MTX_DEF);
220 amdpm_sc->smbus = device_add_child(dev, "smbus", -1);
221 if (!amdpm_sc->smbus) {
234 struct amdpm_softc *amdpm_sc = device_get_softc(dev);
236 if (amdpm_sc->smbus) {
237 device_delete_child(dev, amdpm_sc->smbus);
238 amdpm_sc->smbus = NULL;
241 mtx_destroy(&amdpm_sc->lock);
242 if (amdpm_sc->res)
243 bus_release_resource(dev, SYS_RES_IOPORT, amdpm_sc->rid,
244 amdpm_sc->res);