]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: onboard-hub: Update the bind function based on peer-hub property
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Wed, 4 Dec 2024 07:25:20 +0000 (12:55 +0530)
committerMarek Vasut <marex@denx.de>
Wed, 11 Dec 2024 07:22:17 +0000 (08:22 +0100)
As the "peer-hub" property is optional, don't error out just
skip the bind function.

Fixes: 57e30b09fc ("usb: onboard-hub: Bail out if peer hub is already probed")
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
common/usb_onboard_hub.c

index 6f28036e095c025ccb034f43b32e9c6fa00894ff..7fe62b043e6a727ccb674a44587abacea541f105 100644 (file)
@@ -183,7 +183,12 @@ static int usb_onboard_hub_bind(struct udevice *dev)
        int ret, off;
 
        ret = dev_read_phandle_with_args(dev, "peer-hub", NULL, 0, 0, &phandle);
-       if (ret)  {
+       if (ret == -ENOENT) {
+               dev_dbg(dev, "peer-hub property not present\n");
+               return 0;
+       }
+
+       if (ret) {
                dev_err(dev, "peer-hub not specified\n");
                return ret;
        }