summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-02-10 23:09:55 +0300
committerTom Rini <trini@konsulko.com>2022-02-10 23:09:55 +0300
commitc4408291bfff9622f2d3817a13c997debd0e8200 (patch)
tree3828b8cf7fc4ff57487c55acf6f7f237e8bb4113 /board
parent2ccd2bc8c3580e00c51094c5cc2b3e2ead8d35c3 (diff)
parent7c08680aa32db12e5a7e2765cfc8b7e8ce8895ff (diff)
downloadu-boot-c4408291bfff9622f2d3817a13c997debd0e8200.tar.xz
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
Diffstat (limited to 'board')
-rw-r--r--board/emulation/qemu-riscv/Kconfig1
-rw-r--r--board/emulation/qemu-riscv/qemu-riscv.c12
2 files changed, 13 insertions, 0 deletions
diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig
index a380db61a0..02bf84725b 100644
--- a/board/emulation/qemu-riscv/Kconfig
+++ b/board/emulation/qemu-riscv/Kconfig
@@ -56,6 +56,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
imply DM_SCSI
imply SYS_NS16550
imply SIFIVE_SERIAL
+ imply HTIF_CONSOLE if 64BIT
imply SYSRESET
imply SYSRESET_CMD_POWEROFF
imply SYSRESET_SYSCON
diff --git a/board/emulation/qemu-riscv/qemu-riscv.c b/board/emulation/qemu-riscv/qemu-riscv.c
index b0d9dd59b1..ae3b7a3295 100644
--- a/board/emulation/qemu-riscv/qemu-riscv.c
+++ b/board/emulation/qemu-riscv/qemu-riscv.c
@@ -5,6 +5,7 @@
#include <common.h>
#include <dm.h>
+#include <dm/ofnode.h>
#include <env.h>
#include <fdtdec.h>
#include <image.h>
@@ -16,6 +17,17 @@
DECLARE_GLOBAL_DATA_PTR;
+#if IS_ENABLED(CONFIG_MTD_NOR_FLASH)
+int is_flash_available(void)
+{
+ if (!ofnode_equal(ofnode_by_compatible(ofnode_null(), "cfi-flash"),
+ ofnode_null()))
+ return 1;
+
+ return 0;
+}
+#endif
+
int board_init(void)
{
/*