diff mbox series

[v3,06/17] board_f: Introduce setup_bdinfo initcall

Message ID 20200720141407.30241-6-ovidiu.panait@windriver.com
State Superseded
Delegated to: Tom Rini
Headers show
Series [v3,01/17] Kconfig: Introduce CONFIG_SYS_HAS_SRAM | expand

Commit Message

Ovidiu Panait July 20, 2020, 2:13 p.m. UTC
Introduce setup_bdinfo initcall as a generic routine to populate bdinfo
fields.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
---

 common/board_f.c |  6 ++++++
 include/init.h   | 10 ++++++++++
 2 files changed, 16 insertions(+)

Comments

Simon Glass July 21, 2020, 2:17 p.m. UTC | #1
On Mon, 20 Jul 2020 at 08:18, Ovidiu Panait <ovidiu.panait@windriver.com> wrote:
>
> Introduce setup_bdinfo initcall as a generic routine to populate bdinfo
> fields.
>
> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
> ---
>
>  common/board_f.c |  6 ++++++
>  include/init.h   | 10 ++++++++++
>  2 files changed, 16 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/common/board_f.c b/common/board_f.c
index 88ff0424a7..72446f6da5 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -598,6 +598,11 @@  static int display_new_sp(void)
 	return 0;
 }
 
+int setup_bdinfo(void)
+{
+	return 0;
+}
+
 #if defined(CONFIG_M68K) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || \
 	defined(CONFIG_SH)
 static int setup_board_part1(void)
@@ -975,6 +980,7 @@  static const init_fnc_t init_sequence_f[] = {
 	reserve_stacks,
 	dram_init_banksize,
 	show_dram_config,
+	setup_bdinfo,
 #if defined(CONFIG_M68K) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || \
 	defined(CONFIG_SH)
 	setup_board_part1,
diff --git a/include/init.h b/include/init.h
index e727031514..2a8c910677 100644
--- a/include/init.h
+++ b/include/init.h
@@ -141,6 +141,16 @@  int arch_reserve_stacks(void);
  */
 int arch_reserve_mmu(void);
 
+/**
+ * setup_bdinfo() - Generic boardinfo setup
+ *
+ * Routine for populating various generic boardinfo fields of
+ * gd->bd. It is called during the generic board init sequence.
+ *
+ * Return: 0 if OK
+ */
+int setup_bdinfo(void);
+
 /**
  * init_cache_f_r() - Turn on the cache in preparation for relocation
  *