aboutsummaryrefslogtreecommitdiff
path: root/common/board_r.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-01-10 14:01:57 -0500
committerTom Rini <trini@konsulko.com>2022-01-10 14:01:57 -0500
commitfe04d885fb540b614a2f989e16e808b300ccb52e (patch)
tree613d413c36bda908658fe4c6a24fb1a61de716ce /common/board_r.c
parentd637294e264adfeb29f390dfc393106fd4d41b17 (diff)
parent0dadad6d7c5769d6258baeaf1b8db843b0dfa01f (diff)
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c29
1 files changed, 26 insertions, 3 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 31a59c585a..760c2d05ed 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -586,6 +586,29 @@ int initr_mem(void)
}
#endif
+static int dm_announce(void)
+{
+ int device_count;
+ int uclass_count;
+
+ if (IS_ENABLED(CONFIG_DM)) {
+ dm_get_stats(&device_count, &uclass_count);
+ printf("Core: %d devices, %d uclasses", device_count,
+ uclass_count);
+ if (CONFIG_IS_ENABLED(OF_REAL))
+ printf(", devicetree: %s", fdtdec_get_srcname());
+ printf("\n");
+ if (IS_ENABLED(CONFIG_OF_HAS_PRIOR_STAGE) &&
+ (gd->fdt_src == FDTSRC_SEPARATE ||
+ gd->fdt_src == FDTSRC_EMBED)) {
+ printf("Warning: Unexpected devicetree source (not from a prior stage)");
+ printf("Warning: U-Boot may not function properly\n");
+ }
+ }
+
+ return 0;
+}
+
static int run_main_loop(void)
{
#ifdef CONFIG_SANDBOX
@@ -661,6 +684,7 @@ static init_fnc_t init_sequence_r[] = {
stdio_init_tables,
serial_initialize,
initr_announce,
+ dm_announce,
#if CONFIG_IS_ENABLED(WDT)
initr_watchdog,
#endif
@@ -817,9 +841,8 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
* TODO(sjg@chromium.org): Consider doing this for all archs, or
* dropping the new_gd parameter.
*/
-#if CONFIG_IS_ENABLED(X86_64)
- arch_setup_gd(new_gd);
-#endif
+ if (CONFIG_IS_ENABLED(X86_64) && !IS_ENABLED(CONFIG_EFI_APP))
+ arch_setup_gd(new_gd);
#ifdef CONFIG_NEEDS_MANUAL_RELOC
int i;