mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-23 15:11:42 +00:00
dm: core: Select device tree control correctly for SPL
Some boards will not use device tree for SPL even with driver model. Add the logic to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
1d76bf226a
commit
b2b0d3e712
2 changed files with 18 additions and 6 deletions
|
@ -197,13 +197,15 @@ int dm_init_and_scan(bool pre_reloc_only)
|
||||||
debug("dm_scan_platdata() failed: %d\n", ret);
|
debug("dm_scan_platdata() failed: %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_OF_CONTROL
|
|
||||||
ret = dm_scan_fdt(gd->fdt_blob, pre_reloc_only);
|
if (OF_CONTROL) {
|
||||||
if (ret) {
|
ret = dm_scan_fdt(gd->fdt_blob, pre_reloc_only);
|
||||||
debug("dm_scan_fdt() failed: %d\n", ret);
|
if (ret) {
|
||||||
return ret;
|
debug("dm_scan_fdt() failed: %d\n", ret);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
ret = dm_scan_other(pre_reloc_only);
|
ret = dm_scan_other(pre_reloc_only);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -41,6 +41,16 @@ struct fdt_memory {
|
||||||
fdt_addr_t end;
|
fdt_addr_t end;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_OF_CONTROL
|
||||||
|
# if defined(CONFIG_SPL_BUILD) && defined(SPL_DISABLE_OF_CONTROL)
|
||||||
|
# define OF_CONTROL 0
|
||||||
|
# else
|
||||||
|
# define OF_CONTROL 1
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define OF_CONTROL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Information about a resource. start is the first address of the resource
|
* Information about a resource. start is the first address of the resource
|
||||||
* and end is the last address (inclusive). The length of the resource will
|
* and end is the last address (inclusive). The length of the resource will
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue