From d4c671cc2742927d3aef830b3b56e1ca2377c887 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 5 Mar 2015 12:25:16 -0700 Subject: dm: Add a new CPU init function which can use driver model Since driver model is set up after arch_cpu_init(), that function cannot use drivers. Add a new arch_cpu_init_dm() function which is called immediately after driver model is ready, and can reference devices. This can be used to probe essential devices for the CPU. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- common/board_f.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common') 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 -- cgit v1.2.1