diff options
-rw-r--r-- | boot/fdt_support.c | 5 | ||||
-rw-r--r-- | include/fdt_support.h | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/boot/fdt_support.c b/boot/fdt_support.c index 2c39b2dd14b..49efeec3681 100644 --- a/boot/fdt_support.c +++ b/boot/fdt_support.c @@ -321,7 +321,7 @@ int fdt_kaslrseed(void *fdt, bool overwrite) * board_fdt_chosen_bootargs - boards may override this function to use * alternative kernel command line arguments */ -__weak const char *board_fdt_chosen_bootargs(void) +__weak const char *board_fdt_chosen_bootargs(const struct fdt_property *fdt_ba) { return env_get("bootargs"); } @@ -364,7 +364,8 @@ int fdt_chosen(void *fdt) } } - str = board_fdt_chosen_bootargs(); + str = board_fdt_chosen_bootargs(fdt_get_property(fdt, nodeoffset, + "bootargs", NULL)); if (str) { err = fdt_setprop(fdt, nodeoffset, "bootargs", str, diff --git a/include/fdt_support.h b/include/fdt_support.h index f481881ce64..7731feba5f0 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -231,12 +231,14 @@ int board_rng_seed(struct abuf *buf); /** * board_fdt_chosen_bootargs() - arbitrarily amend fdt kernel command line * + * @fdt_ba: FDT chosen/bootargs from the kernel image if available + * * This is used for late modification of kernel command line arguments just * before they are added into the /chosen node in flat device tree. * * Return: pointer to kernel command line arguments in memory */ -const char *board_fdt_chosen_bootargs(void); +const char *board_fdt_chosen_bootargs(const struct fdt_property *fdt_ba); /* * The keystone2 SOC requires all 32 bit aliased addresses to be converted |