| 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | /* |
| 3 | * LoongArch 3A5000 ext interrupt controller definitions |
| 4 | * |
| 5 | * Copyright (C) 2021 Loongson Technology Corporation Limited |
| 6 | */ |
| 7 | |
| 8 | #ifndef LOONGARCH_EXTIOI_H |
| 9 | #define LOONGARCH_EXTIOI_H |
| 10 | |
| 11 | #include "hw/intc/loongarch_extioi_common.h" |
| 12 | |
| 13 | #define TYPE_LOONGARCH_EXTIOI "loongarch.extioi" |
| 14 | OBJECT_DECLARE_TYPE(LoongArchExtIOIState, LoongArchExtIOIClass, LOONGARCH_EXTIOI) |
| 15 | |
| 16 | struct LoongArchExtIOIState { |
| 17 | LoongArchExtIOICommonState parent_obj; |
| 18 | int dev_fd; |
| 19 | }; |
| 20 | |
| 21 | struct LoongArchExtIOIClass { |
| 22 | LoongArchExtIOICommonClass parent_class; |
| 23 | |
| 24 | DeviceRealize parent_realize; |
| 25 | ResettablePhases parent_phases; |
| 26 | }; |
| 27 | |
| 28 | void kvm_extioi_realize(DeviceState *dev, Error **errp); |
| 29 | int kvm_extioi_get(void *opaque); |
| 30 | int kvm_extioi_put(void *opaque, int version_id); |
| 31 | |
| 32 | #endif /* LOONGARCH_EXTIOI_H */ |