xref: /openbmc/qemu/include/hw/arm/aspeed.h (revision 1a15311a)
1 /*
2  * Aspeed Machines
3  *
4  * Copyright 2018 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 #ifndef ARM_ASPEED_H
10 #define ARM_ASPEED_H
11 
12 #include "hw/boards.h"
13 
14 typedef struct AspeedBoardState AspeedBoardState;
15 
16 #define TYPE_ASPEED_MACHINE       MACHINE_TYPE_NAME("aspeed")
17 #define ASPEED_MACHINE(obj) \
18     OBJECT_CHECK(AspeedMachine, (obj), TYPE_ASPEED_MACHINE)
19 
20 typedef struct AspeedMachine {
21     MachineState parent_obj;
22 
23     bool mmio_exec;
24 } AspeedMachine;
25 
26 #define ASPEED_MACHINE_CLASS(klass) \
27      OBJECT_CLASS_CHECK(AspeedMachineClass, (klass), TYPE_ASPEED_MACHINE)
28 #define ASPEED_MACHINE_GET_CLASS(obj) \
29      OBJECT_GET_CLASS(AspeedMachineClass, (obj), TYPE_ASPEED_MACHINE)
30 
31 typedef struct AspeedMachineClass {
32     MachineClass parent_obj;
33 
34     const char *name;
35     const char *desc;
36     const char *soc_name;
37     uint32_t hw_strap1;
38     uint32_t hw_strap2;
39     const char *fmc_model;
40     const char *spi_model;
41     uint32_t num_cs;
42     void (*i2c_init)(AspeedBoardState *bmc);
43 } AspeedMachineClass;
44 
45 
46 #endif
47