Merge remote-tracking branch 'remotes/alistair23/tags/pull-riscv-to-apply-20211022...
[qemu.git] / include / hw / intc / goldfish_pic.h
1 /*
2 * SPDX-License-Identifer: GPL-2.0-or-later
3 *
4 * Goldfish PIC
5 *
6 * (c) 2020 Laurent Vivier <laurent@vivier.eu>
7 *
8 */
9
10 #ifndef HW_INTC_GOLDFISH_PIC_H
11 #define HW_INTC_GOLDFISH_PIC_H
12
13 #define TYPE_GOLDFISH_PIC "goldfish_pic"
14 OBJECT_DECLARE_SIMPLE_TYPE(GoldfishPICState, GOLDFISH_PIC)
15
16 #define GOLDFISH_PIC_IRQ_NB 32
17
18 struct GoldfishPICState {
19 SysBusDevice parent_obj;
20
21 MemoryRegion iomem;
22 qemu_irq irq;
23
24 uint32_t pending;
25 uint32_t enabled;
26
27 /* statistics */
28 uint64_t stats_irq_count[32];
29 /* for tracing */
30 uint8_t idx;
31 };
32
33 #endif