summaryrefslogtreecommitdiff
path: root/include/init.h
diff options
context:
space:
mode:
authorOvidiu Panait <ovidiu.panait@windriver.com>2020-07-24 14:12:15 +0300
committerTom Rini <trini@konsulko.com>2020-08-06 14:26:35 -0400
commit81e7cb1e71fb216589b4e2fd3eb498ec72489a09 (patch)
tree542292e5a5b908ef71f32d82a7ad01d654c4f9b3 /include/init.h
parentba7431031f657ff18203c9598496e0288809ae17 (diff)
board_f: Introduce arch_setup_bdinfo initcall
Certain architectures (ppc, mips, sh, m68k) use setup board_part1 and setup_board_part2 calls during pre-relocation init to populate gd->bd boardinfo fields. This makes the generic init sequence cluttered with arch-specific ifdefs. In order to clean these arch-specific sequences from generic init, introduce arch_setup_bdinfo weak initcall so that everyone can define their own bdinfo setup routines. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Diffstat (limited to 'include/init.h')
-rw-r--r--include/init.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/init.h b/include/init.h
index f2cd770079..0f48ccb57a 100644
--- a/include/init.h
+++ b/include/init.h
@@ -142,6 +142,18 @@ int arch_reserve_stacks(void);
int arch_reserve_mmu(void);
/**
+ * arch_setup_bdinfo() - Architecture dependent boardinfo setup
+ *
+ * Architecture-specific routine for populating various boardinfo fields of
+ * gd->bd. It is called during the generic board init sequence.
+ *
+ * If an implementation is not provided, it will just be a nop stub.
+ *
+ * Return: 0 if OK
+ */
+int arch_setup_bdinfo(void);
+
+/**
* setup_bdinfo() - Generic boardinfo setup
*
* Routine for populating various generic boardinfo fields of