Home
last modified time | relevance | path

Searched refs:smw (Results 1 – 25 of 33) sorted by relevance

12

/netbsd/src/sys/dev/sysmon/
Dsysmon_wdog.c161 struct sysmon_wdog *smw; in sysmonclose_wdog() local
172 if ((smw = sysmon_armed_wdog) != NULL) { in sysmonclose_wdog()
173 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_UTICKLE) { in sysmonclose_wdog()
174 error = sysmon_wdog_setmode(smw, in sysmonclose_wdog()
175 WDOG_MODE_DISARMED, smw->smw_period); in sysmonclose_wdog()
179 smw->smw_name); in sysmonclose_wdog()
199 struct sysmon_wdog *smw; in sysmonioctl_wdog() local
208 smw = sysmon_wdog_find(wm->wm_name); in sysmonioctl_wdog()
209 if (smw == NULL) { in sysmonioctl_wdog()
214 wm->wm_mode = smw->smw_mode; in sysmonioctl_wdog()
[all …]
Dswwdog.c209 swwdog_setmode(struct sysmon_wdog *smw) in swwdog_setmode() argument
211 struct swwdog_softc *sc = smw->smw_cookie; in swwdog_setmode()
214 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in swwdog_setmode()
217 if (smw->smw_period == 0) in swwdog_setmode()
219 else if (smw->smw_period == WDOG_PERIOD_DEFAULT) in swwdog_setmode()
222 sc->sc_smw.smw_period = smw->smw_period; in swwdog_setmode()
229 swwdog_tickle(struct sysmon_wdog *smw) in swwdog_tickle() argument
232 return swwdog_arm(smw->smw_cookie); in swwdog_tickle()
/netbsd/src/sys/arch/mips/adm5120/dev/
Dadmwdog.c52 static int admwdog_setmode(struct sysmon_wdog *smw);
53 static int admwdog_tickle(struct sysmon_wdog *smw);
86 admwdog_setmode(struct sysmon_wdog *smw) in admwdog_setmode() argument
88 struct admsw_softc *sc = smw->smw_cookie; in admwdog_setmode()
90 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in admwdog_setmode()
95 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in admwdog_setmode()
96 smw->smw_period = 32; in admwdog_setmode()
97 else if (smw->smw_period > ADMWDOG_MAX_PERIOD) in admwdog_setmode()
106 admwdog_tickle(struct sysmon_wdog *smw) in admwdog_tickle() argument
108 struct admsw_softc *sc = smw->smw_cookie; in admwdog_tickle()
[all …]
/netbsd/src/sys/arch/evbmips/atheros/
Dwdog.c144 wdog_tickle(struct sysmon_wdog *smw) in wdog_tickle() argument
146 struct wdog_softc *sc = smw->smw_cookie; in wdog_tickle()
153 wdog_setmode(struct sysmon_wdog *smw) in wdog_setmode() argument
155 struct wdog_softc *sc = smw->smw_cookie; in wdog_setmode()
157 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in wdog_setmode()
161 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in wdog_setmode()
162 smw->smw_period = sc->sc_wdog_period; in wdog_setmode()
163 else if (smw->smw_period != sc->sc_wdog_period) { in wdog_setmode()
168 if (smw->smw_period > sc->sc_wdog_max) { in wdog_setmode()
171 sc->sc_wdog_period = smw->smw_period; in wdog_setmode()
/netbsd/src/sys/arch/sparc64/dev/
Dpld_wdog.c82 pldwdog_tickle(struct sysmon_wdog *smw) in pldwdog_tickle() argument
84 struct pldwdog_softc *sc = smw->smw_cookie; in pldwdog_tickle()
88 device_xname(sc->sc_dev), smw->smw_mode, smw->smw_period); in pldwdog_tickle()
93 smw->smw_period * 10); in pldwdog_tickle()
100 pldwdog_setmode(struct sysmon_wdog *smw) in pldwdog_setmode() argument
102 struct pldwdog_softc *sc = smw->smw_cookie; in pldwdog_setmode()
106 smw->smw_mode); in pldwdog_setmode()
109 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in pldwdog_setmode()
112 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in pldwdog_setmode()
113 smw->smw_period = sc->sc_wdog_period; in pldwdog_setmode()
[all …]
/netbsd/src/sys/arch/arm/imx/
Dimxwdog.c78 wdog_tickle(struct sysmon_wdog *smw) in wdog_tickle() argument
80 struct wdog_softc * const sc = smw->smw_cookie; in wdog_tickle()
89 wdog_setmode(struct sysmon_wdog *smw) in wdog_setmode() argument
91 struct wdog_softc * const sc = smw->smw_cookie; in wdog_setmode()
94 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in wdog_setmode()
103 if (sc->sc_wdog_armed && smw->smw_period == sc->sc_wdog_period) { in wdog_setmode()
104 wdog_tickle(smw); in wdog_setmode()
110 if (smw->smw_period == WDOG_PERIOD_DEFAULT) { in wdog_setmode()
112 smw->smw_period = IMXWDOG_PERIOD_DEFAULT; in wdog_setmode()
118 if (smw->smw_period >= sc->sc_wdog_max_period) in wdog_setmode()
[all …]
/netbsd/src/sys/arch/mips/sibyte/dev/
Dsbwdog.c122 sbwdog_tickle(struct sysmon_wdog *smw) in sbwdog_tickle() argument
124 struct sbwdog_softc *sc = smw->smw_cookie; in sbwdog_tickle()
144 sbwdog_setmode(struct sysmon_wdog *smw) in sbwdog_setmode() argument
146 struct sbwdog_softc *sc = smw->smw_cookie; in sbwdog_setmode()
148 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in sbwdog_setmode()
152 if (smw->smw_period == WDOG_PERIOD_DEFAULT) { in sbwdog_setmode()
154 smw->smw_period = SBWDOG_DEFAULT_PERIOD; /* XXX needed?? */ in sbwdog_setmode()
155 } else if (smw->smw_period > 8) { in sbwdog_setmode()
159 sc->sc_wdog_period = smw->smw_period; in sbwdog_setmode()
165 sbwdog_tickle(smw); in sbwdog_setmode()
/netbsd/src/sys/arch/arm/xscale/
Di80321_wdog.c75 iopwdog_tickle(struct sysmon_wdog *smw) in iopwdog_tickle() argument
84 iopwdog_setmode(struct sysmon_wdog *smw) in iopwdog_setmode() argument
86 struct iopwdog_softc *sc = smw->smw_cookie; in iopwdog_setmode()
88 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in iopwdog_setmode()
93 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in iopwdog_setmode()
94 smw->smw_period = sc->sc_wdog_period; in iopwdog_setmode()
95 else if (smw->smw_period != sc->sc_wdog_period) { in iopwdog_setmode()
101 iopwdog_tickle(smw); in iopwdog_setmode()
Dixp425_wdog.c159 ixpdog_tickle(struct sysmon_wdog *smw) in ixpdog_tickle() argument
161 struct ixpdog_softc *sc = smw->smw_cookie; in ixpdog_tickle()
177 ixpdog_setmode(struct sysmon_wdog *smw) in ixpdog_setmode() argument
179 struct ixpdog_softc *sc = smw->smw_cookie; in ixpdog_setmode()
181 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) in ixpdog_setmode()
184 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in ixpdog_setmode()
185 smw->smw_period = IXPDOG_DEFAULT_PERIOD; in ixpdog_setmode()
186 sc->sc_preset = IXPDOG_COUNTS_PER_SEC * hz * smw->smw_period; in ixpdog_setmode()
188 sc->sc_preset < smw->smw_period) in ixpdog_setmode()
/netbsd/src/sys/dev/ic/
Ddwc_wdt.c110 dwcwdt_tickle(struct sysmon_wdog *smw) in dwcwdt_tickle() argument
112 struct dwcwdt_softc * const sc = smw->smw_cookie; in dwcwdt_tickle()
122 dwcwdt_setmode(struct sysmon_wdog *smw) in dwcwdt_setmode() argument
124 struct dwcwdt_softc * const sc = smw->smw_cookie; in dwcwdt_setmode()
128 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in dwcwdt_setmode()
133 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in dwcwdt_setmode()
134 smw->smw_period = DWCWDT_PERIOD_DEFAULT; in dwcwdt_setmode()
136 intv = dwcwdt_map_period(sc, smw->smw_period, in dwcwdt_setmode()
143 dwcwdt_tickle(smw); in dwcwdt_setmode()
Dgcscpcib.c73 static int gcscpcib_wdog_setmode(struct sysmon_wdog *smw);
74 static int gcscpcib_wdog_tickle(struct sysmon_wdog *smw);
314 gcscpcib_wdog_setmode(struct sysmon_wdog *smw) in gcscpcib_wdog_setmode() argument
316 struct gcscpcib_softc *sc = smw->smw_cookie; in gcscpcib_wdog_setmode()
318 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in gcscpcib_wdog_setmode()
323 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in gcscpcib_wdog_setmode()
324 smw->smw_period = 32; in gcscpcib_wdog_setmode()
325 else if (smw->smw_period > AMD553X_WDT_COUNTMAX) /* too big */ in gcscpcib_wdog_setmode()
345 gcscpcib_wdog_tickle(struct sysmon_wdog *smw) in gcscpcib_wdog_tickle() argument
347 struct gcscpcib_softc *sc = smw->smw_cookie; in gcscpcib_wdog_tickle()
/netbsd/src/sys/arch/powerpc/ibm4xx/dev/
Dwdog.c113 wdog_tickle(struct sysmon_wdog *smw) in wdog_tickle() argument
124 wdog_setmode(struct sysmon_wdog *smw) in wdog_setmode() argument
126 struct wdog_softc * const sc = smw->smw_cookie; in wdog_setmode()
128 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in wdog_setmode()
136 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in wdog_setmode()
137 smw->smw_period = sc->sc_wdog_period; in wdog_setmode()
138 else if (smw->smw_period != sc->sc_wdog_period) { in wdog_setmode()
153 wdog_tickle(smw); in wdog_setmode()
/netbsd/src/sys/dev/acpi/
Dacpi_wdrt.c266 acpi_wdrt_setmode(struct sysmon_wdog *smw) in acpi_wdrt_setmode() argument
268 struct acpi_wdrt_softc *sc = smw->smw_cookie; in acpi_wdrt_setmode()
272 __func__, smw->smw_mode, smw->smw_period)); in acpi_wdrt_setmode()
274 switch (smw->smw_mode & WDOG_MODE_MASK) { in acpi_wdrt_setmode()
285 if (smw->smw_period == 0) in acpi_wdrt_setmode()
287 if (smw->smw_period > sc->sc_max_period) in acpi_wdrt_setmode()
288 smw->smw_period = sc->sc_max_period; in acpi_wdrt_setmode()
299 if (acpi_wdrt_tickle(smw)) in acpi_wdrt_setmode()
314 acpi_wdrt_tickle(struct sysmon_wdog *smw) in acpi_wdrt_tickle() argument
316 struct acpi_wdrt_softc *sc = smw->smw_cookie; in acpi_wdrt_tickle()
[all …]
/netbsd/src/sys/arch/arm/broadcom/
Dbcm2835_pmwdog.c179 bcmpmwdog_setmode(struct sysmon_wdog *smw) in bcmpmwdog_setmode() argument
181 struct bcm2835pmwdog_softc *sc = smw->smw_cookie; in bcmpmwdog_setmode()
184 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in bcmpmwdog_setmode()
188 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in bcmpmwdog_setmode()
189 smw->smw_period = BCM2835_PM_DEFAULT_PERIOD; in bcmpmwdog_setmode()
190 if (smw->smw_period > (BCM2835_PM_WDOG_TIMEMASK >> 16)) in bcmpmwdog_setmode()
192 error = bcmpmwdog_tickle(smw); in bcmpmwdog_setmode()
210 bcmpmwdog_tickle(struct sysmon_wdog *smw) in bcmpmwdog_tickle() argument
212 struct bcm2835pmwdog_softc *sc = smw->smw_cookie; in bcmpmwdog_tickle()
213 uint32_t timeout = smw->smw_period << 16; in bcmpmwdog_tickle()
/netbsd/src/sys/arch/i386/pci/
Dgeodewdg.c153 geode_wdog_tickle(struct sysmon_wdog *smw) in geode_wdog_tickle() argument
156 struct geode_wdog_softc *sc = smw->smw_cookie; in geode_wdog_tickle()
165 geode_wdog_setmode(struct sysmon_wdog *smw) in geode_wdog_setmode() argument
167 struct geode_wdog_softc *sc = smw->smw_cookie; in geode_wdog_setmode()
171 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in geode_wdog_setmode()
177 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in geode_wdog_setmode()
178 smw->smw_period = 32; in geode_wdog_setmode()
179 else if (smw->smw_period > SC1100_WDIVL_MAX) /* too big? */ in geode_wdog_setmode()
182 GEODE_DPRINTF(("%s: period %u\n", __func__, smw->smw_period)); in geode_wdog_setmode()
184 ticks = smw->smw_period * SC1100_WDCLK_HZ; in geode_wdog_setmode()
/netbsd/src/sys/arch/powerpc/booke/dev/
De500wdog.c90 e500wdog_tickle(struct sysmon_wdog *smw) in e500wdog_tickle() argument
97 e500wdog_setmode(struct sysmon_wdog *smw) in e500wdog_setmode() argument
99 struct e500wdog_softc * const sc = smw->smw_cookie; in e500wdog_setmode()
101 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in e500wdog_setmode()
112 && smw->smw_period == sc->sc_wdog_period) { in e500wdog_setmode()
117 sc->sc_wdog_period, smw->smw_period); in e500wdog_setmode()
118 if (smw->smw_period == WDOG_PERIOD_DEFAULT) { in e500wdog_setmode()
120 smw->smw_period = PQ3WDOG_PERIOD_DEFAULT; in e500wdog_setmode()
/netbsd/src/sys/arch/x86/pci/
Dtcpcib.c312 struct sysmon_wdog *smw = &sc->sc_wdt_smw; in tcpcib_resume() local
315 if ((smw->smw_mode & WDOG_MODE_MASK) != WDOG_MODE_DISARMED && in tcpcib_resume()
316 smw->smw_period > 0) { in tcpcib_resume()
317 tcpcib_wdt_init(sc, smw->smw_period); in tcpcib_resume()
328 tcpcib_wdt_setmode(struct sysmon_wdog *smw) in tcpcib_wdt_setmode() argument
330 struct tcpcib_softc *sc = smw->smw_cookie; in tcpcib_wdt_setmode()
333 period = smw->smw_period; in tcpcib_wdt_setmode()
334 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in tcpcib_wdt_setmode()
344 tcpcib_wdt_tickle(smw); in tcpcib_wdt_setmode()
351 tcpcib_wdt_tickle(struct sysmon_wdog *smw) in tcpcib_wdt_tickle() argument
[all …]
Drdcpcib.c259 rdc_wdtimer_setmode(struct sysmon_wdog *smw) in rdc_wdtimer_setmode() argument
261 struct rdcpcib_softc *sc = smw->smw_cookie; in rdc_wdtimer_setmode()
264 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in rdc_wdtimer_setmode()
268 period = smw->smw_period * RDC_WDT0_FREQ; in rdc_wdtimer_setmode()
289 rdc_wdtimer_tickle(struct sysmon_wdog *smw) in rdc_wdtimer_tickle() argument
291 struct rdcpcib_softc *sc = smw->smw_cookie; in rdc_wdtimer_tickle()
/netbsd/src/sys/arch/arm/cortex/
Da9wdt.c115 a9wdt_tickle(struct sysmon_wdog *smw) in a9wdt_tickle() argument
117 struct a9wdt_softc * const sc = smw->smw_cookie; in a9wdt_tickle()
128 a9wdt_setmode(struct sysmon_wdog *smw) in a9wdt_setmode() argument
130 struct a9wdt_softc * const sc = smw->smw_cookie; in a9wdt_setmode()
132 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in a9wdt_setmode()
148 if (sc->sc_wdog_armed && smw->smw_period == sc->sc_wdog_period) { in a9wdt_setmode()
159 if (smw->smw_period == WDOG_PERIOD_DEFAULT) { in a9wdt_setmode()
161 smw->smw_period = A9WDT_PERIOD_DEFAULT; in a9wdt_setmode()
167 if (smw->smw_period >= sc->sc_wdog_max_period) { in a9wdt_setmode()
/netbsd/src/sys/dev/isa/
Dweasel_isa.c220 weasel_isa_wdog_setmode(struct sysmon_wdog *smw) in weasel_isa_wdog_setmode() argument
222 struct weasel_handle *wh = smw->smw_cookie; in weasel_isa_wdog_setmode()
225 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in weasel_isa_wdog_setmode()
228 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in weasel_isa_wdog_setmode()
229 smw->smw_period = wh->wh_wdog_period; in weasel_isa_wdog_setmode()
230 else if (smw->smw_period != wh->wh_wdog_period) { in weasel_isa_wdog_setmode()
235 weasel_isa_wdog_tickle(smw); in weasel_isa_wdog_setmode()
242 weasel_isa_wdog_tickle(struct sysmon_wdog *smw) in weasel_isa_wdog_tickle() argument
244 struct weasel_handle *wh = smw->smw_cookie; in weasel_isa_wdog_tickle()
/netbsd/src/sys/arch/arm/marvell/
Dmvsoctmr.c363 mvsoctmr_wdog_setmode(struct sysmon_wdog *smw) in mvsoctmr_wdog_setmode() argument
365 struct mvsoctmr_softc *sc = smw->smw_cookie; in mvsoctmr_wdog_setmode()
367 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in mvsoctmr_wdog_setmode()
372 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in mvsoctmr_wdog_setmode()
373 smw->smw_period = MVSOC_WDOG_MAX_PERIOD; in mvsoctmr_wdog_setmode()
374 else if (smw->smw_period > MVSOC_WDOG_MAX_PERIOD || in mvsoctmr_wdog_setmode()
375 smw->smw_period <= 0) in mvsoctmr_wdog_setmode()
377 sc->sc_wdog_period = smw->smw_period * mvsoctmr_freq; in mvsoctmr_wdog_setmode()
385 mvsoctmr_wdog_tickle(struct sysmon_wdog *smw) in mvsoctmr_wdog_tickle() argument
387 struct mvsoctmr_softc *sc = smw->smw_cookie; in mvsoctmr_wdog_tickle()
/netbsd/src/sys/arch/mips/ralink/
Dralink_wdog.c223 ra_wdog_tickle(struct sysmon_wdog *smw) in ra_wdog_tickle() argument
225 const ra_wdog_softc_t * const sc = smw->smw_cookie; in ra_wdog_tickle()
242 ra_wdog_setmode(struct sysmon_wdog *smw) in ra_wdog_setmode() argument
244 const ra_wdog_softc_t * const sc = smw->smw_cookie; in ra_wdog_setmode()
245 u_int period = smw->smw_period; in ra_wdog_setmode()
249 if (((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_KTICKLE) && in ra_wdog_setmode()
259 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) in ra_wdog_setmode()
/netbsd/src/sys/dev/pci/
Dweasel_pci.c295 weasel_pci_wdog_setmode(struct sysmon_wdog *smw) in weasel_pci_wdog_setmode() argument
297 struct weasel_softc *sc = smw->smw_cookie; in weasel_pci_wdog_setmode()
300 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in weasel_pci_wdog_setmode()
303 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in weasel_pci_wdog_setmode()
304 smw->smw_period = sc->sc_wdog_period; in weasel_pci_wdog_setmode()
305 else if (smw->smw_period != sc->sc_wdog_period) { in weasel_pci_wdog_setmode()
310 weasel_pci_wdog_tickle(smw); in weasel_pci_wdog_setmode()
317 weasel_pci_wdog_tickle(struct sysmon_wdog *smw) in weasel_pci_wdog_tickle() argument
319 struct weasel_softc *sc = smw->smw_cookie; in weasel_pci_wdog_tickle()
347 sysmon_wdog_setmode(smw, WDOG_MODE_DISARMED, 0); in weasel_pci_wdog_tickle()
Dpwdog.c169 pwdog_setmode(struct sysmon_wdog *smw) in pwdog_setmode() argument
171 struct pwdog_softc *sc = smw->smw_cookie; in pwdog_setmode()
173 switch (smw->smw_mode & WDOG_MODE_MASK) { in pwdog_setmode()
188 pwdog_tickle(struct sysmon_wdog *smw) in pwdog_tickle() argument
190 struct pwdog_softc *sc = smw->smw_cookie; in pwdog_tickle()
/netbsd/src/sys/arch/arm/gemini/
Dgemini_wdt.c167 geminiwdt_setmode(struct sysmon_wdog *smw) in geminiwdt_setmode() argument
169 geminiwdt_softc_t *sc = smw->smw_cookie; in geminiwdt_setmode()
172 if ((smw->smw_mode & WDOG_MODE_MASK) == WDOG_MODE_DISARMED) { in geminiwdt_setmode()
175 if (smw->smw_period == WDOG_PERIOD_DEFAULT) in geminiwdt_setmode()
178 sc->sc_smw.smw_period = smw->smw_period; in geminiwdt_setmode()
186 geminiwdt_tickle(struct sysmon_wdog *smw) in geminiwdt_tickle() argument

12