Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
[oweals/u-boot.git] / arch / arm / mach-at91 / spl_at91.c
index 8c368042a6b29a0ace586c7b17026f0b0a24f482..1065f090e0102d06686409ccf7d477524fa042af 100644 (file)
@@ -75,8 +75,18 @@ 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_AT91SAM9_WATCHDOG)
+#if !defined(CONFIG_WDT_AT91)
        at91_disable_wdt();
 #endif