diff options
author | Tom Rini <trini@konsulko.com> | 2018-11-16 08:37:50 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-11-16 08:37:50 -0500 |
commit | 1d6edcbfed2af33c748f2beb399810a0441888da (patch) | |
tree | fe88d63e5ef1dbe1915f90e02429e8b6934859da /drivers/core/util.c | |
parent | f6206f8587fc7ec82a57dbbeb5de0f94b3c2ef49 (diff) | |
parent | 4c6e27f63c88d065a98f438085dfc36af47d3a23 (diff) |
Merge tag 'pull-14nov18' of git://git.denx.de/u-boot-dm
- virtio implementation and supporting patches
- DM_FLAG_PRE_RELOC fixes
- regmap improvements
- minor buildman and sandbox things
Diffstat (limited to 'drivers/core/util.c')
-rw-r--r-- | drivers/core/util.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/core/util.c b/drivers/core/util.c index 451d4766d0..27a6848703 100644 --- a/drivers/core/util.c +++ b/drivers/core/util.c @@ -4,6 +4,7 @@ */ #include <common.h> +#include <dm/ofnode.h> #include <dm/util.h> #include <linux/libfdt.h> #include <vsprintf.h> @@ -53,3 +54,27 @@ bool dm_fdt_pre_reloc(const void *blob, int offset) return false; } + +bool dm_ofnode_pre_reloc(ofnode node) +{ + if (ofnode_read_bool(node, "u-boot,dm-pre-reloc")) + return true; + +#ifdef CONFIG_TPL_BUILD + if (ofnode_read_bool(node, "u-boot,dm-tpl")) + return true; +#elif defined(CONFIG_SPL_BUILD) + if (ofnode_read_bool(node, "u-boot,dm-spl")) + return true; +#else + /* + * In regular builds individual spl and tpl handling both + * count as handled pre-relocation for later second init. + */ + if (ofnode_read_bool(node, "u-boot,dm-spl") || + ofnode_read_bool(node, "u-boot,dm-tpl")) + return true; +#endif + + return false; +} |