summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Auer <[email protected]>2018-11-22 11:26:30 +0100
committerAndes <[email protected]>2018-11-26 13:57:32 +0800
commit6e10e94ff7f5b88cba036564b7d8ce7b99265157 (patch)
tree6ecba6a0c087c058d81fac9b702f0aa6d94f7070
parent5d8b2e77119ff85420e3074e5c1ac1f5939a1b75 (diff)
riscv: qemu: use device tree passed by prior boot stage
QEMU provides a device tree, which is passed to U-Boot using register a1. We are now able to directly select the device tree with the configuration CONFIG_OF_PRIOR_STAGE. Replace the hard-coded address in qemu-riscv with it. Signed-off-by: Lukas Auer <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Rick Chen <[email protected]>
-rw-r--r--board/emulation/qemu-riscv/qemu-riscv.c11
-rw-r--r--configs/qemu-riscv32_defconfig2
-rw-r--r--configs/qemu-riscv64_defconfig2
3 files changed, 2 insertions, 13 deletions
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
index 2730a288fb1..2ce093e19a9 100644
--- a/board/emulation/qemu-riscv/qemu-riscv.c
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -9,8 +9,6 @@
#include <virtio_types.h>
#include <virtio.h>
-#define MROM_FDT_ADDR 0x1020
-
int board_init(void)
{
/*
@@ -21,12 +19,3 @@ int board_init(void)
return 0;
}
-
-void *board_fdt_blob_setup(void)
-{
- /*
- * QEMU loads a generated DTB for us immediately
- * after the reset vectors in the MROM
- */
- return (void *)MROM_FDT_ADDR;
-}
diff --git a/configs/qemu-riscv32_defconfig b/configs/qemu-riscv32_defconfig
index ff1fb1f30ec..72c54a3dd5c 100644
--- a/configs/qemu-riscv32_defconfig
+++ b/configs/qemu-riscv32_defconfig
@@ -3,4 +3,4 @@ CONFIG_TARGET_QEMU_VIRT=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y
-CONFIG_OF_BOARD=y
+CONFIG_OF_PRIOR_STAGE=y
diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
index 60b647efe84..44766c38f60 100644
--- a/configs/qemu-riscv64_defconfig
+++ b/configs/qemu-riscv64_defconfig
@@ -4,4 +4,4 @@ CONFIG_ARCH_RV64I=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y
-CONFIG_OF_BOARD=y
+CONFIG_OF_PRIOR_STAGE=y