summary refs log tree commit diff stats
path: root/include/hw/intc/loongarch_extioi_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/intc/loongarch_extioi_common.h')
-rw-r--r--include/hw/intc/loongarch_extioi_common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/hw/intc/loongarch_extioi_common.h b/include/hw/intc/loongarch_extioi_common.h
index 51243b8092..d45caa45f2 100644
--- a/include/hw/intc/loongarch_extioi_common.h
+++ b/include/hw/intc/loongarch_extioi_common.h
@@ -7,6 +7,7 @@
 #ifndef LOONGARCH_EXTIOI_COMMON_H
 #define LOONGARCH_EXTIOI_COMMON_H
 
+#include "qom/object.h"
 #include "hw/sysbus.h"
 #include "hw/loongarch/virt.h"
 
@@ -56,6 +57,10 @@
 #define EXTIOI_VIRT_COREMAP_START    (0x40)
 #define EXTIOI_VIRT_COREMAP_END      (0x240)
 
+#define TYPE_LOONGARCH_EXTIOI_COMMON "loongarch_extioi_common"
+OBJECT_DECLARE_TYPE(LoongArchExtIOICommonState,
+                    LoongArchExtIOICommonClass, LOONGARCH_EXTIOI_COMMON)
+
 typedef struct ExtIOICore {
     uint32_t coreisr[EXTIOI_IRQS_GROUP_COUNT];
     DECLARE_BITMAP(sw_isr[LS3A_INTC_IP], EXTIOI_IRQS);
@@ -82,4 +87,11 @@ struct LoongArchExtIOICommonState {
     MemoryRegion extioi_system_mem;
     MemoryRegion virt_extend;
 };
+
+struct LoongArchExtIOICommonClass {
+    SysBusDeviceClass parent_class;
+
+    DeviceRealize parent_realize;
+    int (*post_load)(void *s, int version_id);
+};
 #endif /* LOONGARCH_EXTIOI_H */