diff options
author | Tom Rini <trini@konsulko.com> | 2017-03-17 09:11:12 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-03-17 14:15:17 -0400 |
commit | f9515756b6d76cde99b385dda905dfb20d31ea48 (patch) | |
tree | b2cd0007fb90a43992cb51f1a02d4e191e3dde10 /drivers/core/util.c | |
parent | e245f1a5db086d676cbd97371046ea5c5e554326 (diff) | |
parent | 520c174b3564ae183f0e7c118dc8ce3770ae20b0 (diff) | |
download | u-boot-f9515756b6d76cde99b385dda905dfb20d31ea48.tar.gz |
Merge git://git.denx.de/u-boot-rockchip
This includes support for rk3188 from Heiko Stübner and and rk3328 from
Kever Yang. Also included is SPL support for rk3399 and a fix for
rk3288 to get it booting again (spl_early_init()).
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 e01dd06d28..5ceac8bbb1 100644 --- a/drivers/core/util.c +++ b/drivers/core/util.c @@ -5,6 +5,7 @@ */ #include <common.h> +#include <libfdt.h> #include <vsprintf.h> void dm_warn(const char *fmt, ...) @@ -35,3 +36,27 @@ int list_count_items(struct list_head *head) return count; } + +bool dm_fdt_pre_reloc(const void *blob, int offset) +{ + if (fdt_getprop(blob, offset, "u-boot,dm-pre-reloc", NULL)) + return true; + +#ifdef CONFIG_TPL_BUILD + if (fdt_getprop(blob, offset, "u-boot,dm-tpl", NULL)) + return true; +#elif defined(CONFIG_SPL_BUILD) + if (fdt_getprop(blob, offset, "u-boot,dm-spl", NULL)) + return true; +#else + /* + * In regular builds individual spl and tpl handling both + * count as handled pre-relocation for later second init. + */ + if (fdt_getprop(blob, offset, "u-boot,dm-spl", NULL) || + fdt_getprop(blob, offset, "u-boot,dm-tpl", NULL)) + return true; +#endif + + return false; +} |