]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: core: Mirror the chosen node parse logic in the livetree scanning
authorBin Meng <bmeng.cn@gmail.com>
Thu, 11 Oct 2018 05:07:00 +0000 (22:07 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 14 Nov 2018 17:16:27 +0000 (09:16 -0800)
commit8e39afcd942cdc52acaec33bce6b807b0dcc8cfe
tree6e5a4cf254ed5a43288136aa6555b4ccecb3ca99
parent6244fc64ce9714373908111acf24f70f88c86b3e
dm: core: Mirror the chosen node parse logic in the livetree scanning

Commit f2006808f099: ("dm: core: parse chosen node") added a logic
to parse the chosen node during dm_scan_fdt_node(), but unfortunately
it missed adding the same logic in dm_scan_fdt_live(). This mirrors
the logic in the livetree version.

The weird thing is that commit f2006808f099 did update the test case
to test such logic, but even if I reset to that commit, the test case
still fails, and I have no idea how it could pass.

With this fix, the following 2 test cases now pass:

Test: dm_test_bus_children: bus.c
test/dm/bus.c:112, dm_test_bus_children(): num_devices ==
list_count_items(&uc->dev_head): Expected 7, got 6

Test: dm_test_fdt: test-fdt.c
test/dm/test-fdt.c:184, dm_test_fdt(): num_devices ==
list_count_items(&uc->dev_head): Expected 7, got 6

Fixes: f2006808f099 ("dm: core: parse chosen node")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/root.c