]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd/bdinfo: LMB and device-tree are not related
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 22 Dec 2025 11:44:38 +0000 (12:44 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 24 Dec 2025 08:16:03 +0000 (09:16 +0100)
The usage of the LMB library and the device-tree source are not related.

Remove the dependency in the bdinfo output and adjust the unit test.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
cmd/bdinfo.c
test/cmd/bdinfo.c

index 20c8c97f0cd1e5f8f18af03e9ad1a199d3e92f4b..8e2bbfa9c20cf8d18940bbcd09a45e5529ed2623 100644 (file)
@@ -160,11 +160,12 @@ static int bdinfo_print_all(struct bd_info *bd)
 #if CONFIG_IS_ENABLED(MULTI_DTB_FIT)
        bdinfo_print_num_l("multi_dtb_fit", (ulong)gd->multi_dtb_fit);
 #endif
-       if (IS_ENABLED(CONFIG_LMB) && gd->fdt_blob) {
+       if (IS_ENABLED(CONFIG_LMB))
                lmb_dump_all_force();
-               if (IS_ENABLED(CONFIG_OF_REAL))
-                       printf("devicetree  = %s\n", fdtdec_get_srcname());
-       }
+
+       if (IS_ENABLED(CONFIG_OF_REAL) && gd->fdt_blob)
+               printf("devicetree  = %s\n", fdtdec_get_srcname());
+
        print_serial(gd->cur_serial_dev);
 
        if (IS_ENABLED(CONFIG_CMD_BDINFO_EXTRA)) {
index 2b4866a172ec2154b6db938eff10dc6017138c49..3005c85d4a0b31911bc04903dd3028f38e13cafd 100644 (file)
@@ -191,11 +191,11 @@ static int bdinfo_test_all(struct unit_test_state *uts)
        ut_assertok(test_num_l(uts, "multi_dtb_fit", (ulong)gd->multi_dtb_fit));
 #endif
 
-       if (IS_ENABLED(CONFIG_LMB) && gd->fdt_blob) {
+       if (IS_ENABLED(CONFIG_LMB))
                ut_assertok(lmb_test_dump_all(uts));
-               if (IS_ENABLED(CONFIG_OF_REAL))
-                       ut_assert_nextline("devicetree  = %s", fdtdec_get_srcname());
-       }
+
+       if (IS_ENABLED(CONFIG_OF_REAL) && gd->fdt_blob)
+               ut_assert_nextline("devicetree  = %s", fdtdec_get_srcname());
 
        if (IS_ENABLED(CONFIG_DM_SERIAL)) {
                struct serial_device_info info;