xref: /openbmc/qemu/include/hw/intc/loongarch_pch_pic.h (revision d01d42ccc9510c039b2e4ec49af164e374eab154)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * LoongArch 7A1000 I/O interrupt controller definitions
4  *
5  * Copyright (c) 2021 Loongson Technology Corporation Limited
6  */
7 
8 #ifndef HW_LOONGARCH_PCH_PIC_H
9 #define HW_LOONGARCH_PCH_PIC_H
10 
11 #include "hw/intc/loongarch_pic_common.h"
12 
13 #define TYPE_LOONGARCH_PIC  "loongarch_pic"
14 #define PCH_PIC_NAME(name)  TYPE_LOONGARCH_PIC#name
15 OBJECT_DECLARE_TYPE(LoongarchPICState, LoongarchPICClass, LOONGARCH_PIC)
16 
17 struct LoongarchPICState {
18     LoongArchPICCommonState parent_obj;
19     int dev_fd;
20 };
21 
22 struct LoongarchPICClass {
23     LoongArchPICCommonClass parent_class;
24 
25     DeviceRealize parent_realize;
26     ResettablePhases parent_phases;
27 };
28 
29 void kvm_pic_realize(DeviceState *dev, Error **errp);
30 int kvm_pic_get(void *opaque);
31 int kvm_pic_put(void *opaque, int version_id);
32 
33 #endif /* HW_LOONGARCH_PCH_PIC_H */
34