1 /* 2 * SPDX-License-Identifier: 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 #include "hw/sysbus.h" 14 15 #define TYPE_GOLDFISH_PIC "goldfish_pic" 16 OBJECT_DECLARE_SIMPLE_TYPE(GoldfishPICState, GOLDFISH_PIC) 17 18 #define GOLDFISH_PIC_IRQ_NB 32 19 20 struct GoldfishPICState { 21 SysBusDevice parent_obj; 22 23 MemoryRegion iomem; 24 qemu_irq irq; 25 26 uint32_t pending; 27 uint32_t enabled; 28 29 /* statistics */ 30 uint64_t stats_irq_count[32]; 31 /* for tracing */ 32 uint8_t idx; 33 }; 34 35 #endif 36