arch/riscv: Use FDT from calling argument when using FIT

Only FIT payloads provide their own FDT.

Change-Id: Id08a12ad7b72ad539e934a133acf2c4a5bcdf1f9
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36599
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2019-11-03 12:24:48 +01:00 committed by Patrick Georgi
parent c01d0920bb
commit 763eeecb30
1 changed files with 3 additions and 13 deletions

View File

@ -38,20 +38,10 @@ static void do_arch_prog_run(struct arch_prog_run_args *args)
{
int hart_id;
struct prog *prog = args->prog;
void *fdt = prog_entry_arg(prog);
void *fdt = HLS()->fdt;
/*
* Workaround selfboot putting the coreboot table into prog_entry_arg
*/
if (prog_cbfs_type(prog) == CBFS_TYPE_SELF)
fdt = HLS()->fdt;
/*
* If prog_entry_arg is not set (e.g. by fit_payload), use fdt from HLS
* instead.
*/
if (fdt == NULL)
fdt = HLS()->fdt;
if (prog_cbfs_type(prog) == CBFS_TYPE_FIT)
fdt = prog_entry_arg(prog);
if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) {
if (CONFIG(RISCV_OPENSBI))