mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
9fb45c62ae
commit
5461c4fefe
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue