summaryrefslogtreecommitdiffstats
path: root/board/xilinx/zynq
diff options
context:
space:
mode:
Diffstat (limited to 'board/xilinx/zynq')
-rw-r--r--board/xilinx/zynq/board.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 1106f5c2a8..9c005e40e8 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -36,12 +36,16 @@ int board_early_init_f(void)
int board_init(void)
{
#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;