hw/riscv: virt: Generate fw_cfg DT node correctly
commitf9a461b2d3b8ef4f36b7891eb4040693ee071719
authorAtish Patra <atishp@rivosinc.com>
Thu, 26 May 2022 20:35:00 +0000 (26 13:35 -0700)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 9 Jun 2022 23:31:42 +0000 (10 09:31 +1000)
tree0672a1fb1eb83389d3e4947ad2c5728e9b858f80
parentde799beba7f927b2a1ed38128309316511311605
hw/riscv: virt: Generate fw_cfg DT node correctly

fw_cfg DT node is generated after the create_fdt without any check
if the DT is being loaded from the commandline. This results in
FDT_ERR_EXISTS error if dtb is loaded from the commandline.

Generate fw_cfg node only if the DT is not loaded from the commandline.

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220526203500.847165-1-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/riscv/virt.c