mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
b7563779f9
commit
8bf26a9ea3
5 changed files with 77 additions and 26 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue