diff options
| author | Bibo Mao <maobibo@loongson.cn> | 2024-09-18 14:45:50 +0800 |
|---|---|---|
| committer | Bibo Mao <maobibo@loongson.cn> | 2024-12-19 15:23:29 +0800 |
| commit | 8bf26a9ea3c8067e04c36b0280b219958955196c (patch) | |
| tree | 5cabe0713249fef5717a07baf57f557f6bd7def4 /include/hw/intc/loongarch_pic_common.h | |
| parent | b7563779f9e3a319af1a8d39084d0342e5dbb1bb (diff) | |
| download | focaccia-qemu-8bf26a9ea3c8067e04c36b0280b219958955196c.tar.gz focaccia-qemu-8bf26a9ea3c8067e04c36b0280b219958955196c.zip | |
hw/intc/loongarch_pch: Inherit from loongarch_pic_common
Set TYPE_LOONGARCH_PIC inherit from TYPE_LOONGARCH_PIC_COMMON object, it shares vmsate and property of TYPE_LOONGARCH_PIC_COMMON, and has its own realize() function. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'include/hw/intc/loongarch_pic_common.h')
| -rw-r--r-- | include/hw/intc/loongarch_pic_common.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/hw/intc/loongarch_pic_common.h b/include/hw/intc/loongarch_pic_common.h index 124bb7d226..0a1a28063c 100644 --- a/include/hw/intc/loongarch_pic_common.h +++ b/include/hw/intc/loongarch_pic_common.h @@ -40,6 +40,10 @@ #define POL_LO_START 0x40 #define POL_HI_START 0x44 +#define TYPE_LOONGARCH_PIC_COMMON "loongarch_pic_common" +OBJECT_DECLARE_TYPE(LoongArchPICCommonState, + LoongArchPICCommonClass, LOONGARCH_PIC_COMMON) + struct LoongArchPICCommonState { SysBusDevice parent_obj; @@ -67,4 +71,10 @@ struct LoongArchPICCommonState { MemoryRegion iomem8; unsigned int irq_num; }; + +struct LoongArchPICCommonClass { + SysBusDeviceClass parent_class; + + DeviceRealize parent_realize; +}; #endif /* HW_LOONGARCH_PIC_COMMON_H */ |