ast2400: externalize revision numbers
[qemu/kevin.git] / include / hw / misc / aspeed_scu.h
blobfdfd982288f269fbc9cbf3276b78c9151ab9bd88
1 /*
2 * ASPEED System Control Unit
4 * Andrew Jeffery <andrew@aj.id.au>
6 * Copyright 2016 IBM Corp.
8 * This code is licensed under the GPL version 2 or later. See
9 * the COPYING file in the top-level directory.
11 #ifndef ASPEED_SCU_H
12 #define ASPEED_SCU_H
14 #include "hw/sysbus.h"
16 #define TYPE_ASPEED_SCU "aspeed.scu"
17 #define ASPEED_SCU(obj) OBJECT_CHECK(AspeedSCUState, (obj), TYPE_ASPEED_SCU)
19 #define ASPEED_SCU_NR_REGS (0x1A8 >> 2)
21 typedef struct AspeedSCUState {
22 /*< private >*/
23 SysBusDevice parent_obj;
25 /*< public >*/
26 MemoryRegion iomem;
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;
34 #define AST2400_A0_SILICON_REV 0x02000303U
35 #define AST2500_A0_SILICON_REV 0x04000303U
37 extern bool is_supported_silicon_rev(uint32_t silicon_rev);
39 #endif /* ASPEED_SCU_H */