Home
last modified time | relevance | path

Searched full:wdog (Results 1 – 25 of 175) sorted by relevance

1234567

/openbmc/phosphor-watchdog/test/
H A Dwatchdog.cpp35 wdog(std::make_unique<Watchdog>( in WdogTest()
42 wdog->interval(milliseconds(defaultInterval).count()); in WdogTest()
44 EXPECT_FALSE(wdog->enabled()); in WdogTest()
54 std::unique_ptr<Watchdog> wdog; member in phosphor::watchdog::WdogTest
69 auto previousTimeRemaining = wdog->timeRemaining(); in waitForWatchdog()
72 previousTimeRemaining >= wdog->timeRemaining() && in waitForWatchdog()
73 wdog->timerEnabled()) in waitForWatchdog()
75 previousTimeRemaining = wdog->timeRemaining(); in waitForWatchdog()
91 EXPECT_FALSE(wdog->enabled()); in TEST_F()
92 EXPECT_EQ(0, wdog->timeRemaining()); in TEST_F()
[all …]
/openbmc/linux/drivers/watchdog/
H A Dimx2_wdt.c41 #define IMX2_WDT_WCR_WRE BIT(3) /* -> WDOG Reset Enable */
71 struct watchdog_device wdog; member
100 static int imx2_wdt_restart(struct watchdog_device *wdog, unsigned long action, in imx2_wdt_restart() argument
103 struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog); in imx2_wdt_restart()
115 * Due to imx6q errata ERR004346 (WDOG: WDOG SRS bit requires to be in imx2_wdt_restart()
130 static inline void imx2_wdt_setup(struct watchdog_device *wdog) in imx2_wdt_setup() argument
132 struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog); in imx2_wdt_setup()
144 /* Generate internal chip-level reset if WDOG times out */ in imx2_wdt_setup()
153 val |= WDOG_SEC_TO_COUNT(wdog->timeout); in imx2_wdt_setup()
171 static int imx2_wdt_ping(struct watchdog_device *wdog) in imx2_wdt_ping() argument
[all …]
H A Dimx_sc_wdt.c48 static int imx_sc_wdt_ping(struct watchdog_device *wdog) in imx_sc_wdt_ping() argument
58 static int imx_sc_wdt_start(struct watchdog_device *wdog) in imx_sc_wdt_start() argument
73 static int imx_sc_wdt_stop(struct watchdog_device *wdog) in imx_sc_wdt_stop() argument
83 static int imx_sc_wdt_set_timeout(struct watchdog_device *wdog, in imx_sc_wdt_set_timeout() argument
88 wdog->timeout = timeout; in imx_sc_wdt_set_timeout()
95 static int imx_sc_wdt_set_pretimeout(struct watchdog_device *wdog, in imx_sc_wdt_set_pretimeout() argument
106 (wdog->timeout - pretimeout) * 1000, 0, 0, 0, in imx_sc_wdt_set_pretimeout()
111 wdog->pretimeout = pretimeout; in imx_sc_wdt_set_pretimeout()
159 struct watchdog_device *wdog; in imx_sc_wdt_probe() local
169 wdog = &imx_sc_wdd->wdd; in imx_sc_wdt_probe()
[all …]
H A Dimx7ulp_wdt.c127 static int imx7ulp_wdt_enable(struct watchdog_device *wdog, bool enable) in imx7ulp_wdt_enable() argument
129 struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); in imx7ulp_wdt_enable()
145 static int imx7ulp_wdt_ping(struct watchdog_device *wdog) in imx7ulp_wdt_ping() argument
147 struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); in imx7ulp_wdt_ping()
154 static int imx7ulp_wdt_start(struct watchdog_device *wdog) in imx7ulp_wdt_start() argument
156 return imx7ulp_wdt_enable(wdog, true); in imx7ulp_wdt_start()
159 static int imx7ulp_wdt_stop(struct watchdog_device *wdog) in imx7ulp_wdt_stop() argument
161 return imx7ulp_wdt_enable(wdog, false); in imx7ulp_wdt_stop()
184 static int imx7ulp_wdt_set_timeout(struct watchdog_device *wdog, in imx7ulp_wdt_set_timeout() argument
187 struct imx7ulp_wdt_device *wdt = watchdog_get_drvdata(wdog); in imx7ulp_wdt_set_timeout()
[all …]
H A Domap_wdt.c55 #define to_omap_wdt_dev(_wdog) container_of(_wdog, struct omap_wdt_dev, wdog)
63 struct watchdog_device wdog; member
131 static int omap_wdt_start(struct watchdog_device *wdog) in omap_wdt_start() argument
133 struct omap_wdt_dev *wdev = to_omap_wdt_dev(wdog); in omap_wdt_start()
157 omap_wdt_set_timer(wdev, wdog->timeout); in omap_wdt_start()
166 static int omap_wdt_stop(struct watchdog_device *wdog) in omap_wdt_stop() argument
168 struct omap_wdt_dev *wdev = to_omap_wdt_dev(wdog); in omap_wdt_stop()
178 static int omap_wdt_ping(struct watchdog_device *wdog) in omap_wdt_ping() argument
180 struct omap_wdt_dev *wdev = to_omap_wdt_dev(wdog); in omap_wdt_ping()
189 static int omap_wdt_set_timeout(struct watchdog_device *wdog, in omap_wdt_set_timeout() argument
[all …]
H A Dkeembay_wdt.c70 static void keembay_wdt_set_timeout_reg(struct watchdog_device *wdog) in keembay_wdt_set_timeout_reg() argument
72 struct keembay_wdt *wdt = watchdog_get_drvdata(wdog); in keembay_wdt_set_timeout_reg()
74 keembay_wdt_writel(wdt, TIM_WATCHDOG, wdog->timeout * wdt->rate); in keembay_wdt_set_timeout_reg()
77 static void keembay_wdt_set_pretimeout_reg(struct watchdog_device *wdog) in keembay_wdt_set_pretimeout_reg() argument
79 struct keembay_wdt *wdt = watchdog_get_drvdata(wdog); in keembay_wdt_set_pretimeout_reg()
82 if (wdog->pretimeout) in keembay_wdt_set_pretimeout_reg()
83 th_val = wdog->timeout - wdog->pretimeout; in keembay_wdt_set_pretimeout_reg()
88 static int keembay_wdt_start(struct watchdog_device *wdog) in keembay_wdt_start() argument
90 struct keembay_wdt *wdt = watchdog_get_drvdata(wdog); in keembay_wdt_start()
97 static int keembay_wdt_stop(struct watchdog_device *wdog) in keembay_wdt_stop() argument
[all …]
H A Dbcm7038_wdt.c57 static void bcm7038_wdt_set_timeout_reg(struct watchdog_device *wdog) in bcm7038_wdt_set_timeout_reg() argument
59 struct bcm7038_watchdog *wdt = watchdog_get_drvdata(wdog); in bcm7038_wdt_set_timeout_reg()
62 timeout = wdt->rate * wdog->timeout; in bcm7038_wdt_set_timeout_reg()
67 static int bcm7038_wdt_ping(struct watchdog_device *wdog) in bcm7038_wdt_ping() argument
69 struct bcm7038_watchdog *wdt = watchdog_get_drvdata(wdog); in bcm7038_wdt_ping()
77 static int bcm7038_wdt_start(struct watchdog_device *wdog) in bcm7038_wdt_start() argument
79 bcm7038_wdt_set_timeout_reg(wdog); in bcm7038_wdt_start()
80 bcm7038_wdt_ping(wdog); in bcm7038_wdt_start()
85 static int bcm7038_wdt_stop(struct watchdog_device *wdog) in bcm7038_wdt_stop() argument
87 struct bcm7038_watchdog *wdt = watchdog_get_drvdata(wdog); in bcm7038_wdt_stop()
[all …]
H A Dretu_wdt.c55 static int retu_wdt_start(struct watchdog_device *wdog) in retu_wdt_start() argument
57 struct retu_wdt_dev *wdev = watchdog_get_drvdata(wdog); in retu_wdt_start()
61 return retu_write(wdev->rdev, RETU_REG_WATCHDOG, wdog->timeout); in retu_wdt_start()
64 static int retu_wdt_stop(struct watchdog_device *wdog) in retu_wdt_stop() argument
66 struct retu_wdt_dev *wdev = watchdog_get_drvdata(wdog); in retu_wdt_stop()
73 static int retu_wdt_ping(struct watchdog_device *wdog) in retu_wdt_ping() argument
75 struct retu_wdt_dev *wdev = watchdog_get_drvdata(wdog); in retu_wdt_ping()
77 return retu_write(wdev->rdev, RETU_REG_WATCHDOG, wdog->timeout); in retu_wdt_ping()
80 static int retu_wdt_set_timeout(struct watchdog_device *wdog, in retu_wdt_set_timeout() argument
83 struct retu_wdt_dev *wdev = watchdog_get_drvdata(wdog); in retu_wdt_set_timeout()
[all …]
H A Ddigicolor_wdt.c48 static int dc_wdt_restart(struct watchdog_device *wdog, unsigned long action, in dc_wdt_restart() argument
51 struct dc_wdt *wdt = watchdog_get_drvdata(wdog); in dc_wdt_restart()
60 static int dc_wdt_start(struct watchdog_device *wdog) in dc_wdt_start() argument
62 struct dc_wdt *wdt = watchdog_get_drvdata(wdog); in dc_wdt_start()
64 dc_wdt_set(wdt, wdog->timeout * clk_get_rate(wdt->clk)); in dc_wdt_start()
69 static int dc_wdt_stop(struct watchdog_device *wdog) in dc_wdt_stop() argument
71 struct dc_wdt *wdt = watchdog_get_drvdata(wdog); in dc_wdt_stop()
78 static int dc_wdt_set_timeout(struct watchdog_device *wdog, unsigned int t) in dc_wdt_set_timeout() argument
80 struct dc_wdt *wdt = watchdog_get_drvdata(wdog); in dc_wdt_set_timeout()
83 wdog->timeout = t; in dc_wdt_set_timeout()
[all …]
H A Dexar_wdt.c153 static int exar_wdt_start(struct watchdog_device *wdog) in exar_wdt_start() argument
155 struct wdt_priv *priv = watchdog_get_drvdata(wdog); in exar_wdt_start()
168 static int exar_wdt_stop(struct watchdog_device *wdog) in exar_wdt_stop() argument
170 struct wdt_priv *priv = watchdog_get_drvdata(wdog); in exar_wdt_stop()
180 static int exar_wdt_keepalive(struct watchdog_device *wdog) in exar_wdt_keepalive() argument
182 struct wdt_priv *priv = watchdog_get_drvdata(wdog); in exar_wdt_keepalive()
194 static int exar_wdt_set_timeout(struct watchdog_device *wdog, unsigned int t) in exar_wdt_set_timeout() argument
196 struct wdt_priv *priv = watchdog_get_drvdata(wdog); in exar_wdt_set_timeout()
212 wdog->timeout = unit_min ? t * 60 : t; in exar_wdt_set_timeout()
214 if (watchdog_hw_running(wdog)) in exar_wdt_set_timeout()
[all …]
H A Dbcm_kona_wdt.c199 static int bcm_kona_wdt_set_timeout_reg(struct watchdog_device *wdog, in bcm_kona_wdt_set_timeout_reg() argument
202 struct bcm_kona_wdt *wdt = watchdog_get_drvdata(wdog); in bcm_kona_wdt_set_timeout_reg()
205 SECS_TO_TICKS(wdog->timeout, wdt) | in bcm_kona_wdt_set_timeout_reg()
209 static int bcm_kona_wdt_set_timeout(struct watchdog_device *wdog, in bcm_kona_wdt_set_timeout() argument
212 wdog->timeout = t; in bcm_kona_wdt_set_timeout()
216 static unsigned int bcm_kona_wdt_get_timeleft(struct watchdog_device *wdog) in bcm_kona_wdt_get_timeleft() argument
218 struct bcm_kona_wdt *wdt = watchdog_get_drvdata(wdog); in bcm_kona_wdt_get_timeleft()
232 static int bcm_kona_wdt_start(struct watchdog_device *wdog) in bcm_kona_wdt_start() argument
234 return bcm_kona_wdt_set_timeout_reg(wdog, in bcm_kona_wdt_start()
238 static int bcm_kona_wdt_stop(struct watchdog_device *wdog) in bcm_kona_wdt_stop() argument
[all …]
H A Dbcm2835_wdt.c66 static int bcm2835_wdt_start(struct watchdog_device *wdog) in bcm2835_wdt_start() argument
68 struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); in bcm2835_wdt_start()
74 writel_relaxed(PM_PASSWORD | (SECS_TO_WDOG_TICKS(wdog->timeout) & in bcm2835_wdt_start()
85 static int bcm2835_wdt_stop(struct watchdog_device *wdog) in bcm2835_wdt_stop() argument
87 struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); in bcm2835_wdt_stop()
93 static unsigned int bcm2835_wdt_get_timeleft(struct watchdog_device *wdog) in bcm2835_wdt_get_timeleft() argument
95 struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); in bcm2835_wdt_get_timeleft()
116 static int bcm2835_restart(struct watchdog_device *wdog, in bcm2835_restart() argument
119 struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog); in bcm2835_restart()
H A Dbooke_wdt.c110 struct watchdog_device *wdog = data; in __booke_wdt_set() local
114 val |= WDTP(sec_to_period(wdog->timeout)); in __booke_wdt_set()
129 static int booke_wdt_ping(struct watchdog_device *wdog) in booke_wdt_ping() argument
139 struct watchdog_device *wdog = data; in __booke_wdt_enable() local
145 val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(sec_to_period(wdog->timeout))); in __booke_wdt_enable()
171 static int booke_wdt_start(struct watchdog_device *wdog) in booke_wdt_start() argument
173 on_each_cpu(__booke_wdt_enable, wdog, 0); in booke_wdt_start()
174 pr_debug("watchdog enabled (timeout = %u sec)\n", wdog->timeout); in booke_wdt_start()
179 static int booke_wdt_stop(struct watchdog_device *wdog) in booke_wdt_stop() argument
H A Dw83627hf_wdt.c154 static int w83627hf_init(struct watchdog_device *wdog, enum chips chip) in w83627hf_init() argument
242 wdog->timeout); in w83627hf_init()
243 superio_outb(cr_wdt_timeout, wdog->timeout); in w83627hf_init()
253 wdog->bootstatus |= WDIOF_CARDRESET; in w83627hf_init()
279 static int wdt_start(struct watchdog_device *wdog) in wdt_start() argument
281 return wdt_set_time(wdog->timeout); in wdt_start()
284 static int wdt_stop(struct watchdog_device *wdog) in wdt_stop() argument
289 static int wdt_set_timeout(struct watchdog_device *wdog, unsigned int timeout) in wdt_set_timeout() argument
291 wdog->timeout = timeout; in wdt_set_timeout()
296 static unsigned int wdt_get_time(struct watchdog_device *wdog) in wdt_get_time() argument
H A Dsb_wdog.c68 * wdog is the iomem address of the cfg register
70 static void sbwdog_set(char __iomem *wdog, unsigned long t) in sbwdog_set() argument
73 __raw_writeb(0, wdog); in sbwdog_set()
74 __raw_writeq(t & 0x7fffffUL, wdog - 0x10); in sbwdog_set()
82 * wdog is the iomem address of the cfg register
84 static void sbwdog_pet(char __iomem *wdog) in sbwdog_pet() argument
87 __raw_writeb(__raw_readb(wdog) | 1, wdog); in sbwdog_pet()
H A Dalim1535_wdt.c317 u32 wdog; in ali_find_watchdog() local
342 pci_read_config_dword(pdev, 0xCC, &wdog); in ali_find_watchdog()
345 wdog &= ~0x3F; in ali_find_watchdog()
347 wdog &= ~((1 << 27)|(1 << 26)|(1 << 25)|(1 << 24)); in ali_find_watchdog()
349 wdog &= ~((1 << 16)|(1 << 13)|(1 << 12)|(1 << 11)|(1 << 10)|(1 << 9)); in ali_find_watchdog()
351 pci_write_config_dword(pdev, 0xCC, wdog); in ali_find_watchdog()
/openbmc/u-boot/drivers/watchdog/
H A Dulp_wdog.c11 * MX7ULP WDOG Register Map
45 struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR; in hw_watchdog_set_timeout() local
47 writel(val, &wdog->toval); in hw_watchdog_set_timeout()
52 struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR; in hw_watchdog_reset() local
54 writel(REFRESH_WORD0, &wdog->cnt); in hw_watchdog_reset()
55 writel(REFRESH_WORD1, &wdog->cnt); in hw_watchdog_reset()
61 struct wdog_regs *wdog = (struct wdog_regs *)WDOG_BASE_ADDR; in hw_watchdog_init() local
63 writel(UNLOCK_WORD0, &wdog->cnt); in hw_watchdog_init()
64 writel(UNLOCK_WORD1, &wdog->cnt); in hw_watchdog_init()
66 val = readb(&wdog->cs2); in hw_watchdog_init()
[all …]
H A Dimx_watchdog.c20 struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; in hw_watchdog_reset() local
22 writew(0x5555, &wdog->wsr); in hw_watchdog_reset()
23 writew(0xaaaa, &wdog->wsr); in hw_watchdog_reset()
29 struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; in hw_watchdog_init() local
42 writew((WCR_WDA | WCR_SRS | WCR_WDE) << 8 | timeout, &wdog->wcr); in hw_watchdog_init()
45 WCR_WDA | SET_WCR_WT(timeout), &wdog->wcr); in hw_watchdog_init()
53 struct watchdog_regs *wdog = (struct watchdog_regs *)WDOG1_BASE_ADDR; in reset_cpu() local
55 clrsetbits_le16(&wdog->wcr, WCR_WT_MSK, WCR_WDE); in reset_cpu()
57 writew(0x5555, &wdog->wsr); in reset_cpu()
58 writew(0xaaaa, &wdog->wsr); /* load minimum 1/2 second timeout */ in reset_cpu()
/openbmc/linux/drivers/rtc/
H A Drtc-abx80x.c129 struct watchdog_device wdog; member
613 static int __abx80x_wdog_set_timeout(struct watchdog_device *wdog, in __abx80x_wdog_set_timeout() argument
616 struct abx80x_priv *priv = watchdog_get_drvdata(wdog); in __abx80x_wdog_set_timeout()
626 static int abx80x_wdog_set_timeout(struct watchdog_device *wdog, in abx80x_wdog_set_timeout() argument
631 if (watchdog_hw_running(wdog)) in abx80x_wdog_set_timeout()
632 err = __abx80x_wdog_set_timeout(wdog, new_timeout); in abx80x_wdog_set_timeout()
635 wdog->timeout = new_timeout; in abx80x_wdog_set_timeout()
640 static int abx80x_wdog_ping(struct watchdog_device *wdog) in abx80x_wdog_ping() argument
642 return __abx80x_wdog_set_timeout(wdog, wdog->timeout); in abx80x_wdog_ping()
645 static int abx80x_wdog_start(struct watchdog_device *wdog) in abx80x_wdog_start() argument
[all …]
H A Drtc-ds1511.c140 * the wdog timer can take 99.99 seconds in ds1511_wdog_set()
144 * set the wdog values in the wdog registers in ds1511_wdog_set()
149 * set wdog enable and wdog 'steering' bit to issue a reset in ds1511_wdog_set()
158 * clear wdog enable and wdog 'steering' bits in ds1511_wdog_disable()
162 * clear the wdog counter in ds1511_wdog_disable()
439 * clear the wdog counter in ds1511_rtc_probe()
/openbmc/u-boot/arch/arm/mach-sunxi/
H A Dboard.c278 static const struct sunxi_wdog *wdog = in reset_cpu() local
279 &((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog; in reset_cpu()
282 writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode); in reset_cpu()
283 writel(WDT_CTRL_KEY | WDT_CTRL_RESTART, &wdog->ctl); in reset_cpu()
287 writel(WDT_MODE_RESET_EN | WDT_MODE_EN, &wdog->mode); in reset_cpu()
290 static const struct sunxi_wdog *wdog = in reset_cpu()
291 ((struct sunxi_timer_reg *)SUNXI_TIMER_BASE)->wdog; in reset_cpu()
294 writel(WDT_CFG_RESET, &wdog->cfg); in reset_cpu()
295 writel(WDT_MODE_EN, &wdog->mode); in reset_cpu()
296 writel(WDT_CTRL_KEY | WDT_CTRL_RESTART, &wdog->ctl); in reset_cpu()
/openbmc/qemu/hw/misc/
H A Dbcm2835_powermgt.c41 res = s->wdog; in bcm2835_powermgt_read()
88 "bcm2835_powermgt_write: WDOG\n"); in bcm2835_powermgt_write()
89 s->wdog = value; in bcm2835_powermgt_write()
115 VMSTATE_UINT32(wdog, BCM2835PowerMgtState),
136 s->wdog = 0x00000000; in bcm2835_powermgt_reset()
/openbmc/qemu/include/hw/watchdog/
H A Dwdt_imx2.h36 #define IMX2_WDT_WCR_WDW BIT(7) /* WDOG Disable for Wait */
37 #define IMX2_WDT_WCR_WDA BIT(5) /* WDOG Assertion */
39 #define IMX2_WDT_WCR_WDT BIT(3) /* WDOG Timeout Assertion */
/openbmc/linux/arch/arm/mach-imx/
H A Dsystem.c44 * Due to imx6q errata ERR004346 (WDOG: WDOG SRS bit requires to be in mxc_restart()
72 pr_warn("%s: failed to get wdog clock\n", __func__); in mxc_arch_reset_init()
/openbmc/u-boot/drivers/mmc/
H A Ddavinci_mmc.c92 uint wdog = WATCHDOG_COUNT; local
94 while (--wdog && ((get_val(&regs->mmcst1) & status) != status))
100 if (wdog == 0)
109 uint wdog = WATCHDOG_COUNT; local
111 while (--wdog && (get_val(&regs->mmcst1) & MMCST1_BUSY))
114 if (wdog == 0)
124 uint wdog = WATCHDOG_COUNT; local
127 while (wdog--) {

1234567