Merge tag 'u-boot-imx-20191009' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
[oweals/u-boot.git] / arch / arm / mach-at91 / spl_at91.c
index d701c3586d38805af8abf5baaab81837e0a7d212..1065f090e0102d06686409ccf7d477524fa042af 100644 (file)
@@ -75,8 +75,20 @@ void __weak spl_board_init(void)
 
 void board_init_f(ulong dummy)
 {
+#if CONFIG_IS_ENABLED(OF_CONTROL)
+       int ret;
+
+       ret = spl_early_init();
+       if (ret) {
+               debug("spl_early_init() failed: %d\n", ret);
+               hang();
+       }
+#endif
+
        lowlevel_clock_init();
+#if !defined(CONFIG_WDT_AT91)
        at91_disable_wdt();
+#endif
 
        /*
         * At this stage the main oscillator is supposed to be enabled