]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sandbox: dts: Add compatible string for bind-test node
authorPatrice Chotard <patrice.chotard@st.com>
Tue, 28 Jul 2020 07:13:33 +0000 (09:13 +0200)
committerSimon Glass <sjg@chromium.org>
Sat, 22 Aug 2020 13:58:39 +0000 (07:58 -0600)
Usage of lists_bind_fdt() in bind command imposes to add
a compatible string for bind-test node.

Others impacts are:
  - bind-test node is binded at sandbox start, so no need to bind it
    in test_bind_unbind_with_node() test.
  - As explained just above, after sandbox start, now a phy exist.
    In test/dm/phy.c, it was verified that a third phy didn't exist,
    now we must verified that a fourth phy doesn't exist.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/sandbox/dts/test.dts
test/dm/phy.c
test/py/tests/test_bind.py

index 692c3775ddedc2390cfc34fdd7de07cee8813e52..1d8956abbebab52d700d89c9a269fc262b259815 100644 (file)
        };
 
        bind-test {
+               compatible = "simple-bus";
                bind-test-child1 {
                        compatible = "sandbox,phy";
                        #phy-cells = <1>;
index 75d05a14c030095f59e9d8f431bbfad4bbcf2049..ecbd47bf12fd520ec1694316bd84b490deb00d27 100644 (file)
@@ -47,7 +47,7 @@ static int dm_test_phy_base(struct unit_test_state *uts)
        ut_assert(phy2.dev != phy3.dev);
 
        /* Try to get a non-existing phy */
-       ut_asserteq(-ENODEV, uclass_get_device(UCLASS_PHY, 3, &dev));
+       ut_asserteq(-ENODEV, uclass_get_device(UCLASS_PHY, 4, &dev));
        ut_asserteq(-ENODATA, generic_phy_get_by_name(parent,
                                        "phy_not_existing", &phy1_method1));
 
index e9681c69c54e46c12d9d7eaf64ece89632806dbf..1de125ce459cb5b328dcc3425bd6f3ae89fd6349 100644 (file)
@@ -25,9 +25,6 @@ def in_tree(response, name, uclass, drv, depth, last_child):
 @pytest.mark.buildconfigspec('cmd_bind')
 def test_bind_unbind_with_node(u_boot_console):
 
-       #bind /bind-test. Device should come up as well as its children
-       response = u_boot_console.run_command('bind  /bind-test simple_bus')
-       assert response == ''
        tree = u_boot_console.run_command('dm tree')
        assert in_tree(tree, 'bind-test', 'simple_bus', 'simple_bus', 0, True)
        assert in_tree(tree, 'bind-test-child1', 'phy', 'phy_sandbox', 1, False)