diff options
author | Simon Glass <sjg@chromium.org> | 2015-08-30 16:55:17 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-09-02 21:28:23 -0600 |
commit | bc7b2f431d5e5b48c009007bdf22d2f2d8aed4c4 (patch) | |
tree | 43a9dc43fdf33fa05d96e72867c43f01c3c7c5ee /drivers/core | |
parent | 3346c87625b8a736af5636a0bd1be89f781eb5f2 (diff) |
dm: Provide better debugging when a device fails to bind
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>
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/root.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c index 78ab00c7bfb..bdb394a9ae2 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -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) |