xref: /openbmc/qemu/include/hw/misc/aspeed_xdma.h (revision ebe15582)
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 
14 #define TYPE_ASPEED_XDMA "aspeed.xdma"
15 #define ASPEED_XDMA(obj) OBJECT_CHECK(AspeedXDMAState, (obj), TYPE_ASPEED_XDMA)
16 
17 #define ASPEED_XDMA_NUM_REGS (ASPEED_XDMA_REG_SIZE / sizeof(uint32_t))
18 #define ASPEED_XDMA_REG_SIZE 0x7C
19 
20 typedef struct AspeedXDMAState {
21     SysBusDevice parent;
22 
23     MemoryRegion iomem;
24     qemu_irq irq;
25 
26     char bmc_cmdq_readp_set;
27     uint32_t regs[ASPEED_XDMA_NUM_REGS];
28 } AspeedXDMAState;
29 
30 #endif /* ASPEED_XDMA_H */
31