diff options
author | Tom Rini <trini@konsulko.com> | 2020-04-15 08:30:16 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-04-15 08:30:16 -0400 |
commit | 9cb3ce2558ba1fc058dfb26a07fc02603773a211 (patch) | |
tree | d8359bfc34d7c2425b89dfa8cf7f8ed32b7be2c9 /include | |
parent | 142a07f2a44262d76fec609e1fcde51794a456eb (diff) | |
parent | 19a159f94ac1532ec12cf14a96c9daf172ade988 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-marvell
- Common: honour hw_margin_ms property (Rasmus)
- sp805_wdt: get platform clock from dt (Rayagonda)
Diffstat (limited to 'include')
-rw-r--r-- | include/wdt.h | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/include/wdt.h b/include/wdt.h index dd83dfdd32..aea5abc768 100644 --- a/include/wdt.h +++ b/include/wdt.h @@ -106,41 +106,6 @@ struct wdt_ops { int (*expire_now)(struct udevice *dev, ulong flags); }; -#if CONFIG_IS_ENABLED(WDT) -#ifndef CONFIG_WATCHDOG_TIMEOUT_MSECS -#define CONFIG_WATCHDOG_TIMEOUT_MSECS (60 * 1000) -#endif -#define WATCHDOG_TIMEOUT_SECS (CONFIG_WATCHDOG_TIMEOUT_MSECS / 1000) - -static inline int initr_watchdog(void) -{ - u32 timeout = WATCHDOG_TIMEOUT_SECS; - - /* - * Init watchdog: This will call the probe function of the - * watchdog driver, enabling the use of the device - */ - if (uclass_get_device_by_seq(UCLASS_WDT, 0, - (struct udevice **)&gd->watchdog_dev)) { - debug("WDT: Not found by seq!\n"); - if (uclass_get_device(UCLASS_WDT, 0, - (struct udevice **)&gd->watchdog_dev)) { - printf("WDT: Not found!\n"); - return 0; - } - } - - if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) { - timeout = dev_read_u32_default(gd->watchdog_dev, "timeout-sec", - WATCHDOG_TIMEOUT_SECS); - } - wdt_start(gd->watchdog_dev, timeout * 1000, 0); - gd->flags |= GD_FLG_WDT_READY; - printf("WDT: Started with%s servicing (%ds timeout)\n", - IS_ENABLED(CONFIG_WATCHDOG) ? "" : "out", timeout); - - return 0; -} -#endif +int initr_watchdog(void); #endif /* _WDT_H_ */ |