xref: /openbmc/qemu/include/hw/misc/aspeed_gfx.h (revision 7d87775f)
1 /*
2  * ASPEED GFX Controller
3  *
4  * Copyright (C) 2023 IBM Corp.
5  *
6  * This code is licensed under the GPL version 2 or later.  See
7  * the COPYING file in the top-level directory.
8  */
9 
10 #ifndef ASPEED_GFX_H
11 #define ASPEED_GFX_H
12 
13 #include "hw/sysbus.h"
14 
15 #define TYPE_ASPEED_GFX "aspeed.gfx"
16 #define ASPEED_GFX(obj) OBJECT_CHECK(AspeedGFXState, (obj), TYPE_ASPEED_GFX)
17 
18 #define ASPEED_GFX_NR_REGS (0xFC >> 2)
19 
20 typedef struct AspeedGFXState {
21     /* <private> */
22     SysBusDevice parent;
23 
24     /*< public >*/
25     MemoryRegion iomem;
26     qemu_irq irq;
27 
28     uint32_t regs[ASPEED_GFX_NR_REGS];
29 } AspeedGFXState;
30 
31 #endif /* _ASPEED_GFX_H_ */
32