Commit 29629eb897f8d8119b06477d0ca3c4b424726e51

Authored by Simon Glass
1 parent 054b3a1e80

dm: core: Don't use device tree with of-platdata

When CONFIG_SPL_OF_PLATDATA is enabled we should not access the device
tree. Remove all references to this in the core driver-model code.

Signed-off-by: Simon Glass <sjg@chromium.org>

Showing 3 changed files with 4 additions and 4 deletions Side-by-side Diff

drivers/core/device.c
... ... @@ -608,7 +608,7 @@
608 608  
609 609 fdt_addr_t dev_get_addr_index(struct udevice *dev, int index)
610 610 {
611   -#if CONFIG_IS_ENABLED(OF_CONTROL)
  611 +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
612 612 fdt_addr_t addr;
613 613  
614 614 if (CONFIG_IS_ENABLED(OF_TRANSLATE)) {
drivers/core/lists.c
... ... @@ -99,7 +99,7 @@
99 99 return 0;
100 100 }
101 101  
102   -#if CONFIG_IS_ENABLED(OF_CONTROL)
  102 +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
103 103 /**
104 104 * driver_check_compatible() - Check if a driver is compatible with this node
105 105 *
... ... @@ -188,7 +188,7 @@
188 188 return ret;
189 189 }
190 190  
191   -#if CONFIG_IS_ENABLED(OF_CONTROL)
  191 +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
192 192 int dm_scan_fdt_node(struct udevice *parent, const void *blob, int offset,
193 193 bool pre_reloc_only)
194 194 {
... ... @@ -244,7 +244,7 @@
244 244 return ret;
245 245 }
246 246  
247   - if (CONFIG_IS_ENABLED(OF_CONTROL)) {
  247 + if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) {
248 248 ret = dm_scan_fdt(gd->fdt_blob, pre_reloc_only);
249 249 if (ret) {
250 250 debug("dm_scan_fdt() failed: %d\n", ret);