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