sifive: Move QOM typedefs and add missing includes
[qemu.git] / include / hw / misc / aspeed_xdma.h
1 /*
2 * ASPEED XDMA Controller
3 * Eddie James <eajames@linux.ibm.com>
4 *
5 * Copyright (C) 2019 IBM Corp.
6 * SPDX-License-Identifer: GPL-2.0-or-later
7 */
8
9 #ifndef ASPEED_XDMA_H
10 #define ASPEED_XDMA_H
11
12 #include "hw/sysbus.h"
13 #include "qom/object.h"
14
15 #define TYPE_ASPEED_XDMA "aspeed.xdma"
16 typedef struct AspeedXDMAState AspeedXDMAState;
17 DECLARE_INSTANCE_CHECKER(AspeedXDMAState, ASPEED_XDMA,
18 TYPE_ASPEED_XDMA)
19
20 #define ASPEED_XDMA_NUM_REGS (ASPEED_XDMA_REG_SIZE / sizeof(uint32_t))
21 #define ASPEED_XDMA_REG_SIZE 0x7C
22
23 struct AspeedXDMAState {
24 SysBusDevice parent;
25
26 MemoryRegion iomem;
27 qemu_irq irq;
28
29 char bmc_cmdq_readp_set;
30 uint32_t regs[ASPEED_XDMA_NUM_REGS];
31 };
32
33 #endif /* ASPEED_XDMA_H */