aboutsummaryrefslogtreecommitdiff
path: root/include/hw/riscv
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2019-09-06 09:20:16 -0700
committerPalmer Dabbelt <palmer@sifive.com>2019-09-17 08:42:49 -0700
commit5461c4fefed627eac9e1cadfb5754fc985d6df89 (patch)
treef0dad175201f75ce33e365024906b2b978caf832 /include/hw/riscv
parent9fb45c62ae88726eb472656ae90683098473041a (diff)
downloadqemu-5461c4fefed627eac9e1cadfb5754fc985d6df89.zip
qemu-5461c4fefed627eac9e1cadfb5754fc985d6df89.tar.gz
qemu-5461c4fefed627eac9e1cadfb5754fc985d6df89.tar.bz2
riscv: sifive_u: Instantiate OTP memory with a serial number
This adds an OTP memory with a given serial number to the sifive_u machine. With such support, the upstream U-Boot for sifive_fu540 boots out of the box on the sifive_u machine. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'include/hw/riscv')
-rw-r--r--include/hw/riscv/sifive_u.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/riscv/sifive_u.h b/include/hw/riscv/sifive_u.h
index 7dfd1cb..4d4733c 100644
--- a/include/hw/riscv/sifive_u.h
+++ b/include/hw/riscv/sifive_u.h
@@ -23,6 +23,7 @@
#include "hw/riscv/riscv_hart.h"
#include "hw/riscv/sifive_cpu.h"
#include "hw/riscv/sifive_u_prci.h"
+#include "hw/riscv/sifive_u_otp.h"
#define TYPE_RISCV_U_SOC "riscv.sifive.u.soc"
#define RISCV_U_SOC(obj) \
@@ -39,6 +40,7 @@ typedef struct SiFiveUSoCState {
RISCVHartArrayState u_cpus;
DeviceState *plic;
SiFiveUPRCIState prci;
+ SiFiveUOTPState otp;
CadenceGEMState gem;
} SiFiveUSoCState;
@@ -60,6 +62,7 @@ enum {
SIFIVE_U_PRCI,
SIFIVE_U_UART0,
SIFIVE_U_UART1,
+ SIFIVE_U_OTP,
SIFIVE_U_DRAM,
SIFIVE_U_GEM
};