]> git.baikalelectronics.ru Git - uboot.git/commit
riscv: qemu: Implement is_flash_available() for MTD NOR
authorAnup Patel <apatel@ventanamicro.com>
Thu, 27 Jan 2022 06:11:09 +0000 (11:41 +0530)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 10 Feb 2022 03:18:13 +0000 (11:18 +0800)
commit1af9cf3a3000b272f9d86aa54d46440dfb864782
tree2c0a34eaa1be25dfad02ca9e7c6d169441c8fd52
parentafdcd0b1fd9731a6c8fa464b7a387e0d8faf5286
riscv: qemu: Implement is_flash_available() for MTD NOR

Currently, if MTD NOR is enabled then U-Boot tries to issue flash
commands even when CFI flash DT node is not present. This causes
access fault on RISC-V emulators or ISS which do not emulate CFI
flash. To handle this issue, we implement is_flash_available() for
qemu-riscv board which will return 1 only if CFI flash DT node is
present.

Fixes: 4cc52735737d ("riscv: qemu: Enable MTD NOR flash support")
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
board/emulation/qemu-riscv/qemu-riscv.c