xref: /openbmc/qemu/hw/ppc/e500.h (revision a68694cd)
1 #ifndef PPCE500_H
2 #define PPCE500_H
3 
4 #include "hw/boards.h"
5 #include "hw/platform-bus.h"
6 #include "qom/object.h"
7 
8 struct PPCE500MachineState {
9     /*< private >*/
10     MachineState parent_obj;
11 
12     /* points to instance of TYPE_PLATFORM_BUS_DEVICE if
13      * board supports dynamic sysbus devices
14      */
15     PlatformBusDevice *pbus_dev;
16 };
17 typedef struct PPCE500MachineState PPCE500MachineState;
18 
19 struct PPCE500MachineClass {
20     /*< private >*/
21     MachineClass parent_class;
22 
23     /* required -- must at least add toplevel board compatible */
24     void (*fixup_devtree)(void *fdt);
25 
26     int pci_first_slot;
27     int pci_nr_slots;
28 
29     int mpic_version;
30     bool has_mpc8xxx_gpio;
31     bool has_platform_bus;
32     hwaddr platform_bus_base;
33     hwaddr platform_bus_size;
34     int platform_bus_first_irq;
35     int platform_bus_num_irqs;
36     hwaddr ccsrbar_base;
37     hwaddr pci_pio_base;
38     hwaddr pci_mmio_base;
39     hwaddr pci_mmio_bus_base;
40     hwaddr spin_base;
41 };
42 typedef struct PPCE500MachineClass PPCE500MachineClass;
43 
44 void ppce500_init(MachineState *machine);
45 
46 hwaddr booke206_page_size_to_tlb(uint64_t size);
47 
48 #define TYPE_PPCE500_MACHINE      "ppce500-base-machine"
49 DECLARE_OBJ_CHECKERS(PPCE500MachineState, PPCE500MachineClass,
50                      PPCE500_MACHINE, TYPE_PPCE500_MACHINE)
51 
52 #endif
53