Skip to contentSkip to conversation

hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

PATCH In review Thomas Huth 3 participants 3 messages Jan 12, 2023 SiFive drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none'

'-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead.

---
 docs/about/deprecated.rst       | 6 ------
 docs/about/removed-features.rst | 7 +++++++
 hw/misc/sifive_u_otp.c          | 7 -------
 3 files changed, 7 insertions(+), 13 deletions(-)
docs/about/deprecated.rst +0 -6
index 68d29642d7..bfe8148490 100644
@@ -87,12 +87,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-drive if=none`` for the sifive_u OTP device (since 6.2)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Using ``-drive if=none`` to configure the OTP device of the sifive_u
-RISC-V machine is deprecated. Use ``-drive if=pflash`` instead.
-
 ``-no-hpet`` (since 8.0)
 ''''''''''''''''''''''''
 
docs/about/removed-features.rst +7 -0
index c918cabd1a..6bd0a2b4e4 100644
@@ -422,6 +422,13 @@ the value is hexadecimal.  That is, '0x20M' should be written either as
 ``tty`` and ``parport`` used to be aliases for ``serial`` and ``parallel``
 respectively. The actual backend names should be used instead.
 
+``-drive if=none`` for the sifive_u OTP device (removed in 8.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``-drive if=pflash`` to configure the OTP device of the sifive_u
+RISC-V machine instead.
+
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
hw/misc/sifive_u_otp.c +0 -7
index 6d7fdb040a..8965f5c22a 100644
@@ -210,13 +210,6 @@ static void sifive_u_otp_realize(DeviceState *dev, Error **errp)
     sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mmio);
 
     dinfo = drive_get(IF_PFLASH, 0, 0);
-    if (!dinfo) {
-        dinfo = drive_get(IF_NONE, 0, 0);
-        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;
Signature · 1 line
2.31.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Thomas Huth

'-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead.

---
  docs/about/deprecated.rst       | 6 ------
  docs/about/removed-features.rst | 7 +++++++
  hw/misc/sifive_u_otp.c          | 7 -------
  3 files changed, 7 insertions(+), 13 deletions(-)
Reviewed-by on v2 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 6 lines · Thomas Huth

'-drive if=none' is meant for configuring back-end devices only, so this got marked as deprecated in QEMU 6.2. Users should now only use the new way with '-drive if=pflash' instead.

Alistair

Quoted 63 lines
---
 docs/about/deprecated.rst       | 6 ------
 docs/about/removed-features.rst | 7 +++++++
 hw/misc/sifive_u_otp.c          | 7 -------
 3 files changed, 7 insertions(+), 13 deletions(-)
docs/about/deprecated.rst +0 -6
index 68d29642d7..bfe8148490 100644
@@ -87,12 +87,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-drive if=none`` for the sifive_u OTP device (since 6.2)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Using ``-drive if=none`` to configure the OTP device of the sifive_u
-RISC-V machine is deprecated. Use ``-drive if=pflash`` instead.
-
 ``-no-hpet`` (since 8.0)
 ''''''''''''''''''''''''
 
docs/about/removed-features.rst +7 -0
index c918cabd1a..6bd0a2b4e4 100644
@@ -422,6 +422,13 @@ the value is hexadecimal.  That is, '0x20M' should be written either as
 ``tty`` and ``parport`` used to be aliases for ``serial`` and ``parallel``
 respectively. The actual backend names should be used instead.
 
+``-drive if=none`` for the sifive_u OTP device (removed in 8.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``-drive if=pflash`` to configure the OTP device of the sifive_u
+RISC-V machine instead.
+
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
hw/misc/sifive_u_otp.c +0 -8
index 6d7fdb040a..8965f5c22a 100644
@@ -210,13 +210,6 @@ static void sifive_u_otp_realize(DeviceState *dev, Error **errp)
     sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->mmio);
 
     dinfo = drive_get(IF_PFLASH, 0, 0);
-    if (!dinfo) {
-        dinfo = drive_get(IF_NONE, 0, 0);
-        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;
--

2.31.1