iotests: ensure we print nbd server log on error
[qemu/ar7.git] / include / hw / arm / aspeed.h
blob325c091d09e4a213ce9c260cd1e6f745c10cbdfb
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 typedef struct AspeedBoardConfig {
17 const char *name;
18 const char *desc;
19 const char *soc_name;
20 uint32_t hw_strap1;
21 const char *fmc_model;
22 const char *spi_model;
23 uint32_t num_cs;
24 void (*i2c_init)(AspeedBoardState *bmc);
25 } AspeedBoardConfig;
27 #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed")
28 #define ASPEED_MACHINE(obj) \
29 OBJECT_CHECK(AspeedMachine, (obj), TYPE_ASPEED_MACHINE)
31 typedef struct AspeedMachine {
32 MachineState parent_obj;
33 } AspeedMachine;
35 #define ASPEED_MACHINE_CLASS(klass) \
36 OBJECT_CLASS_CHECK(AspeedMachineClass, (klass), TYPE_ASPEED_MACHINE)
37 #define ASPEED_MACHINE_GET_CLASS(obj) \
38 OBJECT_GET_CLASS(AspeedMachineClass, (obj), TYPE_ASPEED_MACHINE)
40 typedef struct AspeedMachineClass {
41 MachineClass parent_obj;
42 const AspeedBoardConfig *board;
43 } AspeedMachineClass;
46 #endif