qemu/include/hw/intc/goldfish_pic.h
<<
>>
Prefs
   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#define TYPE_GOLDFISH_PIC "goldfish_pic"
  14OBJECT_DECLARE_SIMPLE_TYPE(GoldfishPICState, GOLDFISH_PIC)
  15
  16#define GOLDFISH_PIC_IRQ_NB 32
  17
  18struct 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
  34