From 71eb522c406342c3cefa7a2837c7417eeb430ae1 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Tue, 8 Oct 2019 16:32:25 -0700 Subject: riscv/virt: Add the PFlash CFI01 device Add the CFI01 PFlash to the RISC-V virt board. This is the same PFlash from the ARM Virt board and the implementation is based on the ARM Virt board. This allows users to specify flash files from the command line. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Tested-by: Bin Meng Signed-off-by: Palmer Dabbelt --- include/hw/riscv/virt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/hw/riscv/virt.h') diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index 3d875305d3..b17048a93a 100644 --- a/include/hw/riscv/virt.h +++ b/include/hw/riscv/virt.h @@ -21,6 +21,7 @@ #include "hw/riscv/riscv_hart.h" #include "hw/sysbus.h" +#include "hw/block/flash.h" #define TYPE_RISCV_VIRT_MACHINE MACHINE_TYPE_NAME("virt") #define RISCV_VIRT_MACHINE(obj) \ @@ -33,6 +34,7 @@ typedef struct { /*< public >*/ RISCVHartArrayState soc; DeviceState *plic; + PFlashCFI01 *flash[2]; void *fdt; int fdt_size; @@ -46,6 +48,7 @@ enum { VIRT_PLIC, VIRT_UART0, VIRT_VIRTIO, + VIRT_FLASH, VIRT_DRAM, VIRT_PCIE_MMIO, VIRT_PCIE_PIO, -- cgit v1.2.3