aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/misc/sifive_u_otp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/misc/sifive_u_otp.c b/hw/misc/sifive_u_otp.c
index 18aa0bd..cf6098f 100644
--- a/hw/misc/sifive_u_otp.c
+++ b/hw/misc/sifive_u_otp.c
@@ -209,7 +209,14 @@ static void sifive_u_otp_realize(DeviceState *dev, Error **errp)
TYPE_SIFIVE_U_OTP, SIFIVE_U_OTP_REG_SIZE);
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mmio);
- dinfo = drive_get_next(IF_NONE);
+ dinfo = drive_get_next(IF_PFLASH);
+ if (!dinfo) {
+ dinfo = drive_get_next(IF_NONE);
+ if (dinfo) {
+ warn_report("using \"-drive if=none\" for the OTP is deprecated, "
+ "use \"-drive if=pflash\" instead.");
+ }
+ }
if (dinfo) {
int ret;
uint64_t perm;