summaryrefslogtreecommitdiffstats
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-25 08:27:16 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:09:57 -0700
commit94f7afdf7e9909204d0005196db47cca2a28e4cb (patch)
tree62707f2123f7938d9fd03becd206c9cdb67e0b74 /drivers/core
parentb9749eb5e4660fa6ec85c9a16acdbf3dd6609046 (diff)
downloadu-boot-94f7afdf7e9909204d0005196db47cca2a28e4cb.tar.gz
u-boot-94f7afdf7e9909204d0005196db47cca2a28e4cb.tar.xz
u-boot-94f7afdf7e9909204d0005196db47cca2a28e4cb.zip
dm: core: Ignore disabled devices when binding
We don't want to bind devices which should never be used. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/root.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c
index a5b0a61501..73e3c7228e 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -9,6 +9,7 @@
#include <common.h>
#include <errno.h>
+#include <fdtdec.h>
#include <malloc.h>
#include <libfdt.h>
#include <dm/device.h>
@@ -92,6 +93,10 @@ int dm_scan_fdt_node(struct udevice *parent, const void *blob, int offset,
if (pre_reloc_only &&
!fdt_getprop(blob, offset, "u-boot,dm-pre-reloc", NULL))
continue;
+ if (!fdtdec_get_is_enabled(blob, offset)) {
+ dm_dbg(" - ignoring disabled device\n");
+ continue;
+ }
err = lists_bind_fdt(parent, blob, offset, NULL);
if (err && !ret)
ret = err;