[PATCH 3/3] riscv: qemu: Implement is_flash_available() for MTD NOR

Rick Chen rickchen36 at gmail.com
Tue Jan 25 02:18:36 CET 2022


> From: Anup Patel <apatel at ventanamicro.com>
> Sent: Saturday, January 15, 2022 12:20 AM
> To: Rick Jian-Zhi Chen(陳建志) <rick at andestech.com>; Bin Meng <bmeng.cn at gmail.com>
> Cc: Atish Patra <atishp at atishpatra.org>; Alistair Francis <Alistair.Francis at wdc.com>; Anup Patel <anup at brainfault.org>; U-Boot Mailing List <u-boot at lists.denx.de>; Anup Patel <apatel at ventanamicro.com>
> Subject: [PATCH 3/3] 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: d248627f9d42 ("riscv: qemu: Enable MTD NOR flash support")
> Signed-off-by: Anup Patel <apatel at ventanamicro.com>
> ---
>  board/emulation/qemu-riscv/qemu-riscv.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)

Reviewed-by: Rick Chen <rick at andestech.com>


More information about the U-Boot mailing list