mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
fdt: Report the devicetree source
It can be confusing to figure out where the devicetree came from. It seems important enough to warrant a message during boot. Add information about the number of devices and uclasses too since it is helpful to have some idea what is going on with driver model. Report the devicetree source in bdinfo too. This looks something like this, with > marking the new line. U-Boot 2021.10-00190 (Oct 30 2021 - 09:01:29 -0600) DRAM: 128 MiB > Core: 42 devices, 11 uclasses, devicetree: passage Flash: 64 MiB Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
39605c6ec3
commit
ff66e7bb73
3 changed files with 33 additions and 0 deletions
13
lib/fdtdec.c
13
lib/fdtdec.c
|
@ -76,6 +76,19 @@ static const char * const compat_names[COMPAT_COUNT] = {
|
|||
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue