aboutsummaryrefslogtreecommitdiff
path: root/drivers/core/syscon-uclass.c
diff options
context:
space:
mode:
authorSimon Glass2017-07-29 11:34:52 -0600
committerJaehoon Chung2017-08-17 16:44:16 +0900
commit745fb9c25e9fd4c59e375cf8f6e2eb8ff75d6d95 (patch)
tree58d2839550dac78ea474a809c465962ba945d206 /drivers/core/syscon-uclass.c
parent722b150e6f51290f7c8686a5284f8770db27e140 (diff)
dm: core: Avoid calling dm_scan_fdt_dev() with of-platdata
We cannot call dm_scan_fdt_dev() with of-platdata since there is no device tree. Fix this with an #if check. Fixes: 3be9a37 (dm: syscon: scan sub-nodes of the syscon node) Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/syscon-uclass.c')
-rw-r--r--drivers/core/syscon-uclass.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index 2148469abc1..a69937e63c1 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -104,5 +104,8 @@ static const struct udevice_id generic_syscon_ids[] = {
U_BOOT_DRIVER(generic_syscon) = {
.name = "syscon",
.id = UCLASS_SYSCON,
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+ .bind = dm_scan_fdt_dev,
+#endif
.of_match = generic_syscon_ids,
};