]> git.proxmox.com Git - mirror_qemu.git/blob - include/hw/arm/aspeed.h
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-05-07' into staging
[mirror_qemu.git] / include / hw / arm / aspeed.h
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 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 uint32_t ram;
26 } AspeedBoardConfig;
27
28 #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed")
29 #define ASPEED_MACHINE(obj) \
30 OBJECT_CHECK(AspeedMachine, (obj), TYPE_ASPEED_MACHINE)
31
32 typedef struct AspeedMachine {
33 MachineState parent_obj;
34 } AspeedMachine;
35
36 #define ASPEED_MACHINE_CLASS(klass) \
37 OBJECT_CLASS_CHECK(AspeedMachineClass, (klass), TYPE_ASPEED_MACHINE)
38 #define ASPEED_MACHINE_GET_CLASS(obj) \
39 OBJECT_GET_CLASS(AspeedMachineClass, (obj), TYPE_ASPEED_MACHINE)
40
41 typedef struct AspeedMachineClass {
42 MachineClass parent_obj;
43 const AspeedBoardConfig *board;
44 } AspeedMachineClass;
45
46
47 #endif