]> git.sur5r.net Git - u-boot/commitdiff
dm: Provide better debugging when a device fails to bind
authorSimon Glass <sjg@chromium.org>
Sun, 30 Aug 2015 22:55:17 +0000 (16:55 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 3 Sep 2015 03:28:23 +0000 (21:28 -0600)
All devices should bind without error. But when they don't, they can cause
driver model init to fail. A real situation where this can happen is when
there is a missing uclass.

Add a debug() call to dm_scan_fdt_node to make this easier to track.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/root.c

index 78ab00c7bfbf9e4d46cdf2c9e83e3cf2011d23e8..bdb394a9ae21f3d1f2d80b355abe03cdaace8dae 100644 (file)
@@ -162,8 +162,11 @@ int dm_scan_fdt_node(struct udevice *parent, const void *blob, int offset,
                        continue;
                }
                err = lists_bind_fdt(parent, blob, offset, NULL);
-               if (err && !ret)
+               if (err && !ret) {
                        ret = err;
+                       debug("%s: ret=%d\n", fdt_get_name(blob, offset, NULL),
+                             ret);
+               }
        }
 
        if (ret)