Skip to content

Commit

Permalink
hw: Replace anti-social QOM type names (again)
Browse files Browse the repository at this point in the history
QOM type names containing ',' result in awful UI.  We got rid of them
in v6.0.0 (commit e178113 hw: Replace anti-social QOM type names).
A few have crept back since:

    xlnx,cframe-reg
    xlnx,efuse
    xlnx,pmc-efuse-cache
    xlnx,versal-cfu-apb
    xlnx,versal-cfu-fdro
    xlnx,versal-cfu-sfr
    xlnx,versal-crl
    xlnx,versal-efuse
    xlnx,zynqmp-efuse

These are all device types.  They can't be plugged with -device /
device_add, except for "xlnx,efuse" (I'm not sure that one is
intentional).

They *can* be used with -device / device_add to request help.
Usability is poor, though: you have to double the comma, like this:

    $ qemu-system-aarch64 -device xlnx,,pmc-efuse-cache,help

They can also be used with -global, where you must *not* double the
comma:

    $ qemu-system-aarch64 -global xlnx,efuse.drive-index=2

Trap for the unwary.

"xlnx,efuse", "xlnx,versal-efuse", "xlnx,pmc-efuse-cache",
"xlnx-zynqmp-efuse" are from v6.2.0, "xlnx,versal-crl" is from v7.1.0,
and the remainder are new.

Rename them all to "xlnx-FOO", like commit e178113 did.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Message-ID: <20231117114457.177308-3-thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
Markus Armbruster authored and huth committed Dec 20, 2023
1 parent bce9bbc commit c455e01
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/system/arm/xlnx-versal-virt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ To use a different index value, N, from default of 1, add:

.. code-block:: bash
-global xlnx,efuse.drive-index=N
-global xlnx-efuse.drive-index=N
.. warning::
In actual physical Versal, BBRAM and eFUSE contain sensitive data.
Expand Down
2 changes: 1 addition & 1 deletion include/hw/misc/xlnx-versal-cframe-reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "hw/misc/xlnx-versal-cfu.h"
#include "qemu/fifo32.h"

#define TYPE_XLNX_VERSAL_CFRAME_REG "xlnx,cframe-reg"
#define TYPE_XLNX_VERSAL_CFRAME_REG "xlnx-cframe-reg"
OBJECT_DECLARE_SIMPLE_TYPE(XlnxVersalCFrameReg, XLNX_VERSAL_CFRAME_REG)

#define TYPE_XLNX_VERSAL_CFRAME_BCAST_REG "xlnx.cframe-bcast-reg"
Expand Down
6 changes: 3 additions & 3 deletions include/hw/misc/xlnx-versal-cfu.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include "hw/misc/xlnx-cfi-if.h"
#include "qemu/fifo32.h"

#define TYPE_XLNX_VERSAL_CFU_APB "xlnx,versal-cfu-apb"
#define TYPE_XLNX_VERSAL_CFU_APB "xlnx-versal-cfu-apb"
OBJECT_DECLARE_SIMPLE_TYPE(XlnxVersalCFUAPB, XLNX_VERSAL_CFU_APB)

#define TYPE_XLNX_VERSAL_CFU_FDRO "xlnx,versal-cfu-fdro"
#define TYPE_XLNX_VERSAL_CFU_FDRO "xlnx-versal-cfu-fdro"
OBJECT_DECLARE_SIMPLE_TYPE(XlnxVersalCFUFDRO, XLNX_VERSAL_CFU_FDRO)

#define TYPE_XLNX_VERSAL_CFU_SFR "xlnx,versal-cfu-sfr"
#define TYPE_XLNX_VERSAL_CFU_SFR "xlnx-versal-cfu-sfr"
OBJECT_DECLARE_SIMPLE_TYPE(XlnxVersalCFUSFR, XLNX_VERSAL_CFU_SFR)

REG32(CFU_ISR, 0x0)
Expand Down
2 changes: 1 addition & 1 deletion include/hw/misc/xlnx-versal-crl.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "hw/register.h"
#include "target/arm/cpu.h"

#define TYPE_XLNX_VERSAL_CRL "xlnx,versal-crl"
#define TYPE_XLNX_VERSAL_CRL "xlnx-versal-crl"
OBJECT_DECLARE_SIMPLE_TYPE(XlnxVersalCRL, XLNX_VERSAL_CRL)

REG32(ERR_CTRL, 0x0)
Expand Down
2 changes: 1 addition & 1 deletion include/hw/nvram/xlnx-efuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "sysemu/block-backend.h"
#include "hw/qdev-core.h"

#define TYPE_XLNX_EFUSE "xlnx,efuse"
#define TYPE_XLNX_EFUSE "xlnx-efuse"
OBJECT_DECLARE_SIMPLE_TYPE(XlnxEFuse, XLNX_EFUSE);

struct XlnxEFuse {
Expand Down
4 changes: 2 additions & 2 deletions include/hw/nvram/xlnx-versal-efuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@

#define XLNX_VERSAL_EFUSE_CTRL_R_MAX ((0x100 / 4) + 1)

#define TYPE_XLNX_VERSAL_EFUSE_CTRL "xlnx,versal-efuse"
#define TYPE_XLNX_VERSAL_EFUSE_CACHE "xlnx,pmc-efuse-cache"
#define TYPE_XLNX_VERSAL_EFUSE_CTRL "xlnx-versal-efuse"
#define TYPE_XLNX_VERSAL_EFUSE_CACHE "xlnx-pmc-efuse-cache"

OBJECT_DECLARE_SIMPLE_TYPE(XlnxVersalEFuseCtrl, XLNX_VERSAL_EFUSE_CTRL);
OBJECT_DECLARE_SIMPLE_TYPE(XlnxVersalEFuseCache, XLNX_VERSAL_EFUSE_CACHE);
Expand Down
2 changes: 1 addition & 1 deletion include/hw/nvram/xlnx-zynqmp-efuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#define XLNX_ZYNQMP_EFUSE_R_MAX ((0x10fc / 4) + 1)

#define TYPE_XLNX_ZYNQMP_EFUSE "xlnx,zynqmp-efuse"
#define TYPE_XLNX_ZYNQMP_EFUSE "xlnx-zynqmp-efuse"
OBJECT_DECLARE_SIMPLE_TYPE(XlnxZynqMPEFuse, XLNX_ZYNQMP_EFUSE);

struct XlnxZynqMPEFuse {
Expand Down

0 comments on commit c455e01

Please sign in to comment.