1fca9ca1bSCédric Le Goater /* 2fca9ca1bSCédric Le Goater * Aspeed Machines 3fca9ca1bSCédric Le Goater * 4fca9ca1bSCédric Le Goater * Copyright 2018 IBM Corp. 5fca9ca1bSCédric Le Goater * 6fca9ca1bSCédric Le Goater * This code is licensed under the GPL version 2 or later. See 7fca9ca1bSCédric Le Goater * the COPYING file in the top-level directory. 8fca9ca1bSCédric Le Goater */ 9fca9ca1bSCédric Le Goater #ifndef ARM_ASPEED_H 10fca9ca1bSCédric Le Goater #define ARM_ASPEED_H 11fca9ca1bSCédric Le Goater 12fca9ca1bSCédric Le Goater #include "hw/boards.h" 13fca9ca1bSCédric Le Goater 14fca9ca1bSCédric Le Goater typedef struct AspeedBoardState AspeedBoardState; 15fca9ca1bSCédric Le Goater 16fca9ca1bSCédric Le Goater #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed") 17fca9ca1bSCédric Le Goater #define ASPEED_MACHINE(obj) \ 18fca9ca1bSCédric Le Goater OBJECT_CHECK(AspeedMachine, (obj), TYPE_ASPEED_MACHINE) 19fca9ca1bSCédric Le Goater 20fca9ca1bSCédric Le Goater typedef struct AspeedMachine { 21fca9ca1bSCédric Le Goater MachineState parent_obj; 22*1a15311aSCédric Le Goater 23*1a15311aSCédric Le Goater bool mmio_exec; 24fca9ca1bSCédric Le Goater } AspeedMachine; 25fca9ca1bSCédric Le Goater 26fca9ca1bSCédric Le Goater #define ASPEED_MACHINE_CLASS(klass) \ 27fca9ca1bSCédric Le Goater OBJECT_CLASS_CHECK(AspeedMachineClass, (klass), TYPE_ASPEED_MACHINE) 28fca9ca1bSCédric Le Goater #define ASPEED_MACHINE_GET_CLASS(obj) \ 29fca9ca1bSCédric Le Goater OBJECT_GET_CLASS(AspeedMachineClass, (obj), TYPE_ASPEED_MACHINE) 30fca9ca1bSCédric Le Goater 31fca9ca1bSCédric Le Goater typedef struct AspeedMachineClass { 32fca9ca1bSCédric Le Goater MachineClass parent_obj; 33baa4732bSCédric Le Goater 34baa4732bSCédric Le Goater const char *name; 35baa4732bSCédric Le Goater const char *desc; 36baa4732bSCédric Le Goater const char *soc_name; 37baa4732bSCédric Le Goater uint32_t hw_strap1; 38baa4732bSCédric Le Goater uint32_t hw_strap2; 39baa4732bSCédric Le Goater const char *fmc_model; 40baa4732bSCédric Le Goater const char *spi_model; 41baa4732bSCédric Le Goater uint32_t num_cs; 42baa4732bSCédric Le Goater void (*i2c_init)(AspeedBoardState *bmc); 43fca9ca1bSCédric Le Goater } AspeedMachineClass; 44fca9ca1bSCédric Le Goater 45fca9ca1bSCédric Le Goater 46fca9ca1bSCédric Le Goater #endif 47