diff options
Diffstat (limited to 'board')
-rw-r--r-- | board/emulation/qemu-riscv/Kconfig | 1 | ||||
-rw-r--r-- | board/emulation/qemu-riscv/qemu-riscv.c | 12 |
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) { /* |