aspeed.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. #include "hw/boards.h"
  12. #include "qom/object.h"
  13. typedef struct AspeedMachineState AspeedMachineState;
  14. #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed")
  15. typedef struct AspeedMachineClass AspeedMachineClass;
  16. DECLARE_OBJ_CHECKERS(AspeedMachineState, AspeedMachineClass,
  17. ASPEED_MACHINE, TYPE_ASPEED_MACHINE)
  18. #define ASPEED_MAC0_ON (1 << 0)
  19. #define ASPEED_MAC1_ON (1 << 1)
  20. #define ASPEED_MAC2_ON (1 << 2)
  21. #define ASPEED_MAC3_ON (1 << 3)
  22. struct AspeedMachineClass {
  23. MachineClass parent_obj;
  24. const char *name;
  25. const char *desc;
  26. const char *soc_name;
  27. uint32_t hw_strap1;
  28. uint32_t hw_strap2;
  29. const char *fmc_model;
  30. const char *spi_model;
  31. uint32_t num_cs;
  32. uint32_t macs_mask;
  33. void (*i2c_init)(AspeedMachineState *bmc);
  34. uint32_t uart_default;
  35. bool sdhci_wp_inverted;
  36. };
  37. #endif