MAINTAINERS: Make section QOM cover hw/core/*bus.c as well
[qemu/armbru.git] / include / hw / arm / aspeed.h
blob95b4daece86de324077f90e0a859002dfbdfb183
1 /*
2 * Aspeed Machines
4 * Copyright 2018 IBM Corp.
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
12 #include "hw/boards.h"
14 typedef struct AspeedBoardState AspeedBoardState;
16 #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed")
17 #define ASPEED_MACHINE(obj) \
18 OBJECT_CHECK(AspeedMachine, (obj), TYPE_ASPEED_MACHINE)
20 typedef struct AspeedMachine {
21 MachineState parent_obj;
23 bool mmio_exec;
24 } AspeedMachine;
26 #define ASPEED_MAC0_ON (1 << 0)
27 #define ASPEED_MAC1_ON (1 << 1)
28 #define ASPEED_MAC2_ON (1 << 2)
29 #define ASPEED_MAC3_ON (1 << 3)
31 #define ASPEED_MACHINE_CLASS(klass) \
32 OBJECT_CLASS_CHECK(AspeedMachineClass, (klass), TYPE_ASPEED_MACHINE)
33 #define ASPEED_MACHINE_GET_CLASS(obj) \
34 OBJECT_GET_CLASS(AspeedMachineClass, (obj), TYPE_ASPEED_MACHINE)
36 typedef struct AspeedMachineClass {
37 MachineClass parent_obj;
39 const char *name;
40 const char *desc;
41 const char *soc_name;
42 uint32_t hw_strap1;
43 uint32_t hw_strap2;
44 const char *fmc_model;
45 const char *spi_model;
46 uint32_t num_cs;
47 uint32_t macs_mask;
48 void (*i2c_init)(AspeedBoardState *bmc);
49 } AspeedMachineClass;
52 #endif