summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--board/xilinx/zynqmp/zynqmp.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 81c10fcf8a..06cdcbdba6 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -312,12 +312,16 @@ int board_init(void)
#endif
#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT)
- if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
- puts("Watchdog: Not found!\n");
- } else {
- wdt_start(watchdog_dev, 0, 0);
- puts("Watchdog: Started\n");
+ if (uclass_get_device_by_seq(UCLASS_WDT, 0, &watchdog_dev)) {
+ debug("Watchdog: Not found by seq!\n");
+ if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
+ puts("Watchdog: Not found!\n");
+ return 0;
+ }
}
+
+ wdt_start(watchdog_dev, 0, 0);
+ puts("Watchdog: Started\n");
#endif
return 0;