Skip to content

Commit

Permalink
versal: use OBJECT_DECLARE_SIMPLE_TYPE
Browse files Browse the repository at this point in the history
As part of moving the device implementations for LPD INT CSR,
LPD SLCR, and PMC INT CSR from Xilinx QEMU to stable 9.1, some
of the device models need to be migrated to use the modern QOM
templates for device structures. This eliminates the use of
OBJECT_CHECK in favor of the OBJECT_DECLARE_TYPE macros.

Signed-off-by: Nelson Ho <[email protected]>
  • Loading branch information
ho28 committed Dec 10, 2024
1 parent b797140 commit b593346
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
4 changes: 1 addition & 3 deletions include/hw/misc/xlnx-versal-intlpd-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
#include "qom/object.h"

#define TYPE_XILINX_INTLPD_CONFIG "xlnx-intlpd-config"

#define XILINX_INTLPD_CONFIG(obj) \
OBJECT_CHECK(INTLPD_CONFIG, (obj), TYPE_XILINX_INTLPD_CONFIG)
OBJECT_DECLARE_SIMPLE_TYPE(INTLPD_CONFIG, XILINX_INTLPD_CONFIG)

#define AFIFS_SERBS_ID 1

Expand Down
4 changes: 1 addition & 3 deletions include/hw/misc/xlnx-versal-lpd-slcr.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
#include "qom/object.h"

#define TYPE_XILINX_LPD_SLCR "xlnx.versal-lpd-slcr"

#define XILINX_LPD_SLCR(obj) \
OBJECT_CHECK(LPD_SLCR, (obj), TYPE_XILINX_LPD_SLCR)
OBJECT_DECLARE_SIMPLE_TYPE(LPD_SLCR, XILINX_LPD_SLCR)

#define LPD_SLCR_R_MAX 83

Expand Down
3 changes: 0 additions & 3 deletions include/hw/misc/xlnx-versal-pmc-int.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
#define TYPE_XILINX_PMC_INT_REGS "xlnx.versal-pmc-int"
OBJECT_DECLARE_SIMPLE_TYPE(PMC_INT_REGS, XILINX_PMC_INT_REGS)

#define XILINX_PMC_INT_REGS(obj) \
OBJECT_CHECK(PMC_INT_REGS, (obj), TYPE_XILINX_PMC_INT_REGS)

#define PMC_INT_REGS_R_MAX 44

typedef struct PMC_INT_REGS {
Expand Down

0 comments on commit b593346

Please sign in to comment.