- watchdog: designware: make reset really optional (Quentin)
- watchdog: Drop GD_FLG_WDT_READY (Stefan)
This commit is contained in:
Tom Rini 2022-11-22 08:07:03 -05:00
commit b94db9efe8
3 changed files with 7 additions and 11 deletions

View File

@ -72,13 +72,13 @@ static int designware_wdt_reset(struct udevice *dev)
static int designware_wdt_stop(struct udevice *dev)
{
struct designware_wdt_priv *priv = dev_get_priv(dev);
__maybe_unused int ret;
designware_wdt_reset(dev);
writel(0, priv->base + DW_WDT_CR);
if (CONFIG_IS_ENABLED(DM_RESET)) {
int ret;
if (CONFIG_IS_ENABLED(DM_RESET) &&
ofnode_read_prop(dev_ofnode(dev), "resets", &ret)) {
ret = reset_assert_bulk(&priv->resets);
if (ret)
return ret;
@ -135,7 +135,8 @@ static int designware_wdt_probe(struct udevice *dev)
priv->clk_khz = CONFIG_DW_WDT_CLOCK_KHZ;
#endif
if (CONFIG_IS_ENABLED(DM_RESET)) {
if (CONFIG_IS_ENABLED(DM_RESET) &&
ofnode_read_prop(dev_ofnode(dev), "resets", &ret)) {
ret = reset_get_bulk(dev, &priv->resets);
if (ret)
goto err;

View File

@ -105,7 +105,6 @@ int initr_watchdog(void)
init_watchdog_dev(dev);
}
gd->flags |= GD_FLG_WDT_READY;
return 0;
}

View File

@ -635,9 +635,9 @@ enum gd_flags {
*/
GD_FLG_LOG_READY = 0x10000,
/**
* @GD_FLG_WDT_READY: watchdog is ready for use
* @GD_FLG_CYCLIC_RUNNING: cyclic_run is in progress
*/
GD_FLG_WDT_READY = 0x20000,
GD_FLG_CYCLIC_RUNNING = 0x20000,
/**
* @GD_FLG_SKIP_LL_INIT: don't perform low-level initialization
*/
@ -650,10 +650,6 @@ enum gd_flags {
* @GD_FLG_FDT_CHANGED: Device tree change has been detected by tests
*/
GD_FLG_FDT_CHANGED = 0x100000,
/**
* @GD_FLG_CYCLIC_RUNNING: cyclic_run is in progress
*/
GD_FLG_CYCLIC_RUNNING = 0x200000,
};
#endif /* __ASSEMBLY__ */