1 /* 2 * Raspberry Pi emulation (c) 2012 Gregory Estrade 3 * Upstreaming code cleanup [including bcm2835_*] (c) 2013 Jan Petrous 4 * 5 * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft 6 * Written by Andrew Baumann 7 * 8 * This code is licensed under the GNU GPLv2 and later. 9 */ 10 11 #ifndef BCM2835_PERIPHERALS_H 12 #define BCM2835_PERIPHERALS_H 13 14 #include "hw/sysbus.h" 15 #include "hw/char/pl011.h" 16 #include "hw/char/bcm2835_aux.h" 17 #include "hw/display/bcm2835_fb.h" 18 #include "hw/dma/bcm2835_dma.h" 19 #include "hw/intc/bcm2835_ic.h" 20 #include "hw/misc/bcm2835_property.h" 21 #include "hw/misc/bcm2835_rng.h" 22 #include "hw/misc/bcm2835_mbox.h" 23 #include "hw/misc/bcm2835_thermal.h" 24 #include "hw/sd/sdhci.h" 25 #include "hw/sd/bcm2835_sdhost.h" 26 #include "hw/gpio/bcm2835_gpio.h" 27 #include "hw/timer/bcm2835_systmr.h" 28 #include "hw/misc/unimp.h" 29 30 #define TYPE_BCM2835_PERIPHERALS "bcm2835-peripherals" 31 #define BCM2835_PERIPHERALS(obj) \ 32 OBJECT_CHECK(BCM2835PeripheralState, (obj), TYPE_BCM2835_PERIPHERALS) 33 34 typedef struct BCM2835PeripheralState { 35 /*< private >*/ 36 SysBusDevice parent_obj; 37 /*< public >*/ 38 39 MemoryRegion peri_mr, peri_mr_alias, gpu_bus_mr, mbox_mr; 40 MemoryRegion ram_alias[4]; 41 qemu_irq irq, fiq; 42 43 BCM2835SystemTimerState systmr; 44 UnimplementedDeviceState armtmr; 45 UnimplementedDeviceState cprman; 46 UnimplementedDeviceState a2w; 47 PL011State uart0; 48 BCM2835AuxState aux; 49 BCM2835FBState fb; 50 BCM2835DMAState dma; 51 BCM2835ICState ic; 52 BCM2835PropertyState property; 53 BCM2835RngState rng; 54 BCM2835MboxState mboxes; 55 SDHCIState sdhci; 56 BCM2835SDHostState sdhost; 57 BCM2835GpioState gpio; 58 Bcm2835ThermalState thermal; 59 UnimplementedDeviceState i2s; 60 UnimplementedDeviceState spi[1]; 61 UnimplementedDeviceState i2c[3]; 62 UnimplementedDeviceState otp; 63 UnimplementedDeviceState dbus; 64 UnimplementedDeviceState ave0; 65 UnimplementedDeviceState bscsl; 66 UnimplementedDeviceState smi; 67 UnimplementedDeviceState dwc2; 68 UnimplementedDeviceState sdramc; 69 } BCM2835PeripheralState; 70 71 #endif /* BCM2835_PERIPHERALS_H */ 72