xref: /qemu/include/hw/misc/aspeed_scu.h (revision bf8d4924)
1 /*
2  * ASPEED System Control Unit
3  *
4  * Andrew Jeffery <andrew@aj.id.au>
5  *
6  * Copyright 2016 IBM Corp.
7  *
8  * This code is licensed under the GPL version 2 or later.  See
9  * the COPYING file in the top-level directory.
10  */
11 #ifndef ASPEED_SCU_H
12 #define ASPEED_SCU_H
13 
14 #include "hw/sysbus.h"
15 
16 #define TYPE_ASPEED_SCU "aspeed.scu"
17 #define ASPEED_SCU(obj) OBJECT_CHECK(AspeedSCUState, (obj), TYPE_ASPEED_SCU)
18 
19 #define ASPEED_SCU_NR_REGS (0x1A8 >> 2)
20 
21 typedef struct AspeedSCUState {
22     /*< private >*/
23     SysBusDevice parent_obj;
24 
25     /*< public >*/
26     MemoryRegion iomem;
27 
28     uint32_t regs[ASPEED_SCU_NR_REGS];
29     uint32_t silicon_rev;
30     uint32_t hw_strap1;
31     uint32_t hw_strap2;
32 } AspeedSCUState;
33 
34 #endif /* ASPEED_SCU_H */
35