Esempio n. 1
0
int
bcmpm_activate(struct device *self, int act)
{
	switch (act) {
	case DVACT_POWERDOWN:
		wdog_shutdown(self);
		break;
	}

	return 0;
}
Esempio n. 2
0
int
imc_activate(struct device *self, int act)
{
	int rv = 0;

	switch (act) {
	case DVACT_POWERDOWN:
#ifndef SMALL_KERNEL
		wdog_shutdown(self);
#endif
		rv = config_activate_children(self, act);
		break;
	}

	return (rv);
}
Esempio n. 3
0
int
glxpcib_activate(struct device *self, int act)
{
#ifndef SMALL_KERNEL
	struct glxpcib_softc *sc = (struct glxpcib_softc *)self;
	uint i;
#endif
	int rv = 0;

	switch (act) {
	case DVACT_SUSPEND:
#ifndef SMALL_KERNEL
		if (sc->sc_wdog) {
			sc->sc_wdog_period = bus_space_read_2(sc->sc_iot,
			    sc->sc_ioh, AMD5536_MFGPT0_CMP2);
			glxpcib_wdogctl_cb(sc, 0);
		}
#endif
		rv = config_activate_children(self, act);
#ifndef SMALL_KERNEL
		for (i = 0; i < nitems(glxpcib_msrlist); i++)
			sc->sc_msrsave[i] = rdmsr(glxpcib_msrlist[i]);
#endif

		break;
	case DVACT_RESUME:
#ifndef SMALL_KERNEL
		if (sc->sc_wdog)
			glxpcib_wdogctl_cb(sc, sc->sc_wdog_period);
		for (i = 0; i < nitems(glxpcib_msrlist); i++)
			wrmsr(glxpcib_msrlist[i], sc->sc_msrsave[i]);
#endif
		rv = config_activate_children(self, act);
		break;
	case DVACT_POWERDOWN:
#ifndef SMALL_KERNEL
		if (sc->sc_wdog)
			wdog_shutdown(self);
#endif
		rv = config_activate_children(self, act);
		break;
	default:
		rv = config_activate_children(self, act);
		break;
	}
	return (rv);
}
Esempio n. 4
0
int
tcpcib_activate(struct device *self, int act)
{
	struct tcpcib_softc *sc = (struct tcpcib_softc *)self;
	int rv = 0;
	
	switch (act) {
	case DVACT_SUSPEND:
		rv = config_activate_children(self, act);
		/* Watchdog is running, disable it */
		if (sc->sc_active & E600_WDT_ACTIVE && sc->sc_wdt_period != 0)
			tcpcib_wdt_stop(sc);
		break;
	case DVACT_RESUME:
		if (sc->sc_active & E600_WDT_ACTIVE) {
			/*
			 * Watchdog was running prior to suspend so reenable
			 * it, otherwise make sure it stays disabled
			 */
			if (sc->sc_wdt_period != 0) {
				tcpcib_wdt_init(sc, sc->sc_wdt_period);
				tcpcib_wdt_start(sc);
			} else
				tcpcib_wdt_stop(sc);
		}
		if (sc->sc_active & E600_HPET_ACTIVE)
			bus_space_write_4(sc->sc_hpet_iot, sc->sc_hpet_ioh,
			    E600_HPET_GC, E600_HPET_GC_ENABLE);
		rv = config_activate_children(self, act);
		break;
	case DVACT_POWERDOWN:
		if (sc->sc_active & E600_WDT_ACTIVE)
			wdog_shutdown(self);
		rv = config_activate_children(self, act);
		break;
	default:
		rv = config_activate_children(self, act);
		break;
	}
	return (rv);
}