diff options
author | Tom Rini <trini@konsulko.com> | 2022-09-12 09:47:16 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-12 09:47:16 -0400 |
commit | 0ba282e0eeaf29fd78f021fd2f95f7bc3109868d (patch) | |
tree | 476db0709b1006db5677d78ae3c66034613f8dbb /common/fdt_support.c | |
parent | a5fc388ed966974256bc03b3d4db7ae1be0ed119 (diff) | |
parent | 6ad2452bc61d925eaa40f52377baaddf92c43464 (diff) |
Merge tag 'dm-pull-12sep22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Binman VPL support (patch was lost)
Add board_rng_seed() as a temporary solution
Diffstat (limited to 'common/fdt_support.c')
-rw-r--r-- | common/fdt_support.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c index 8c18af2ce15..baf7fb70659 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -7,6 +7,7 @@ */ #include <common.h> +#include <abuf.h> #include <env.h> #include <log.h> #include <mapmem.h> @@ -279,6 +280,7 @@ __weak char *board_fdt_chosen_bootargs(void) int fdt_chosen(void *fdt) { + struct abuf buf = {}; int nodeoffset; int err; char *str; /* used to set string properties */ @@ -294,6 +296,17 @@ int fdt_chosen(void *fdt) if (nodeoffset < 0) return nodeoffset; + if (IS_ENABLED(CONFIG_BOARD_RNG_SEED) && !board_rng_seed(&buf)) { + err = fdt_setprop(fdt, nodeoffset, "rng-seed", + abuf_data(&buf), abuf_size(&buf)); + abuf_uninit(&buf); + if (err < 0) { + printf("WARNING: could not set rng-seed %s.\n", + fdt_strerror(err)); + return err; + } + } + str = board_fdt_chosen_bootargs(); if (str) { |