lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob);
lmb_dump_all_force(&lmb);
+ if (IS_ENABLED(CONFIG_OF_REAL))
+ printf("devicetree = %s\n", fdtdec_get_srcname());
}
arch_print_bdinfo();
}
#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");
+ }
+
+ return 0;
+}
+
static int run_main_loop(void)
{
#ifdef CONFIG_SANDBOX
stdio_init_tables,
serial_initialize,
initr_announce,
+ dm_announce,
#if CONFIG_IS_ENABLED(WDT)
initr_watchdog,
#endif
COMPAT(ALTERA_SOCFPGA_CLK_INIT, "altr,socfpga-a10-clk-init")
};
+static const char *const fdt_src_name[] = {
+ [FDTSRC_SEPARATE] = "separate",
+ [FDTSRC_FIT] = "fit",
+ [FDTSRC_BOARD] = "board",
+ [FDTSRC_EMBED] = "embed",
+ [FDTSRC_ENV] = "env",
+};
+
+const char *fdtdec_get_srcname(void)
+{
+ return fdt_src_name[gd->fdt_src];
+}
+
const char *fdtdec_get_compatible(enum fdt_compat_id id)
{
/* We allow reading of the 'unknown' ID for testing purposes */