[U-Boot] [PATCH v2 01/40] dm: core: Avoid calling dm_scan_fdt_dev() with of-platdata

Simon Glass sjg at chromium.org
Sat Jul 29 17:34:52 UTC 2017


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 at chromium.org>
---

Changes in v2:
- Add new patch to avoid calling dm_scan_fdt_dev() with of-platdata

 drivers/core/syscon-uclass.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/core/syscon-uclass.c b/drivers/core/syscon-uclass.c
index b06ca6a8f2..a69937e63c 100644
--- a/drivers/core/syscon-uclass.c
+++ b/drivers/core/syscon-uclass.c
@@ -104,6 +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,
 };
-- 
2.14.0.rc0.400.g1c36432dff-goog



More information about the U-Boot mailing list