#ifndef _ASM_ARCH_SYS_PROTO_H
#define _ASM_ARCH_SYS_PROTO_H
-
-/* provided to defeat compiler optimisation in board_init_f() */
-void gru_dummy_function(int i);
-
#endif /* _ASM_ARCH_SYS_PROTO_H */
{
}
+__weak int board_early_init_f(void)
+{
+ return 0;
+}
+
__weak int arch_cpu_init(void)
{
return 0;
#ifdef CONFIG_DEBUG_UART
debug_uart_init();
-# ifdef CONFIG_TARGET_CHROMEBOOK_BOB
- int sum, i;
-
- /*
- * Add a delay and ensure that the compiler does not optimise this out.
- * This is needed since the power rails tail a while to turn on, and
- * we get garbage serial output otherwise.
- */
- sum = 0;
- for (i = 0; i < 150000; i++)
- sum += i;
- gru_dummy_function(sum);
-#endif /* CONFIG_TARGET_CHROMEBOOK_BOB */
-
/*
* Debug UART can be used from here if required:
*
debug("U-Boot SPL board init\n");
#endif
+ board_early_init_f();
arch_cpu_init();
ret = spl_early_init();
return 0;
}
+#ifdef CONFIG_SPL_BUILD
/* provided to defeat compiler optimisation in board_init_f() */
void gru_dummy_function(int i)
{
}
+
+int board_early_init_f(void)
+{
+# ifdef CONFIG_TARGET_CHROMEBOOK_BOB
+ int sum, i;
+
+ /*
+ * Add a delay and ensure that the compiler does not optimise this out.
+ * This is needed since the power rails tail a while to turn on, and
+ * we get garbage serial output otherwise.
+ */
+ sum = 0;
+ for (i = 0; i < 150000; i++)
+ sum += i;
+ gru_dummy_function(sum);
+#endif /* CONFIG_TARGET_CHROMEBOOK_BOB */
+
+ return 0;
+}
+#endif