summaryrefslogtreecommitdiff
path: root/board/emulation/qemu-riscv/qemu-riscv.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-10-03 08:09:53 -0400
committerTom Rini <trini@konsulko.com>2018-10-03 08:09:53 -0400
commit94228a9188803473206544c8f33649ea72bf1ee1 (patch)
tree90404ec7c59822c3706f3051e393001a5c53aef5 /board/emulation/qemu-riscv/qemu-riscv.c
parente5145ad0e8c2a21f1db376b01c676907f1500ac6 (diff)
parent5845f6612372a63877b2175e058a841e1237ffd6 (diff)
Merge git://git.denx.de/u-boot-riscv
- QEMU support
Diffstat (limited to 'board/emulation/qemu-riscv/qemu-riscv.c')
-rw-r--r--board/emulation/qemu-riscv/qemu-riscv.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
new file mode 100644
index 0000000000..041e716c9b
--- /dev/null
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
+ */
+
+#include <common.h>
+#include <fdtdec.h>
+
+#define MROM_FDT_ADDR 0x1020
+
+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;
+}