summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/board_f.c6
-rw-r--r--include/common.h11
2 files changed, 17 insertions, 0 deletions
diff --git a/common/board_f.c b/common/board_f.c
index cb956b853c..a570390f77 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -815,6 +815,11 @@ __weak int reserve_arch(void)
return 0;
}
+__weak int arch_cpu_init_dm(void)
+{
+ return 0;
+}
+
static init_fnc_t init_sequence_f[] = {
#ifdef CONFIG_SANDBOX
setup_ram_buf,
@@ -835,6 +840,7 @@ static init_fnc_t init_sequence_f[] = {
fdtdec_check_fdt,
#endif
initf_dm,
+ arch_cpu_init_dm,
#if defined(CONFIG_BOARD_EARLY_INIT_F)
board_early_init_f,
#endif
diff --git a/include/common.h b/include/common.h
index 6df05b8bb1..9c0f1ba811 100644
--- a/include/common.h
+++ b/include/common.h
@@ -253,6 +253,17 @@ int update_flash_size(int flash_size);
int arch_early_init_r(void);
/**
+ * arch_cpu_init_dm() - init CPU after driver model is available
+ *
+ * This is called immediately after driver model is available before
+ * relocation. This is similar to arch_cpu_init() but is able to reference
+ * devices
+ *
+ * @return 0 if OK, -ve on error
+ */
+int arch_cpu_init_dm(void);
+
+/**
* Reserve all necessary stacks
*
* This is used in generic board init sequence in common/board_f.c. Each