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 work is licensed under the terms of the GNU GPL, version 2 or later. 9 * See the COPYING file in the top-level directory. 10 */ 11 12 #ifndef BCM2835_PERIPHERALS_H 13 #define BCM2835_PERIPHERALS_H 14 15 #include "hw/sysbus.h" 16 #include "hw/char/pl011.h" 17 #include "hw/char/bcm2835_aux.h" 18 #include "hw/display/bcm2835_fb.h" 19 #include "hw/dma/bcm2835_dma.h" 20 #include "hw/intc/bcm2835_ic.h" 21 #include "hw/misc/bcm2835_property.h" 22 #include "hw/misc/bcm2835_rng.h" 23 #include "hw/misc/bcm2835_mbox.h" 24 #include "hw/misc/bcm2835_thermal.h" 25 #include "hw/sd/sdhci.h" 26 #include "hw/sd/bcm2835_sdhost.h" 27 #include "hw/gpio/bcm2835_gpio.h" 28 #include "hw/timer/bcm2835_systmr.h" 29 #include "hw/misc/unimp.h" 30 31 #define TYPE_BCM2835_PERIPHERALS "bcm2835-peripherals" 32 #define BCM2835_PERIPHERALS(obj) \ 33 OBJECT_CHECK(BCM2835PeripheralState, (obj), TYPE_BCM2835_PERIPHERALS) 34 35 typedef struct BCM2835PeripheralState { 36 /*< private >*/ 37 SysBusDevice parent_obj; 38 /*< public >*/ 39 40 MemoryRegion peri_mr, peri_mr_alias, gpu_bus_mr, mbox_mr; 41 MemoryRegion ram_alias[4]; 42 qemu_irq irq, fiq; 43 44 BCM2835SystemTimerState systmr; 45 UnimplementedDeviceState armtmr; 46 UnimplementedDeviceState cprman; 47 UnimplementedDeviceState a2w; 48 PL011State uart0; 49 BCM2835AuxState aux; 50 BCM2835FBState fb; 51 BCM2835DMAState dma; 52 BCM2835ICState ic; 53 BCM2835PropertyState property; 54 BCM2835RngState rng; 55 BCM2835MboxState mboxes; 56 SDHCIState sdhci; 57 BCM2835SDHostState sdhost; 58 BCM2835GpioState gpio; 59 Bcm2835ThermalState thermal; 60 UnimplementedDeviceState i2s; 61 UnimplementedDeviceState spi[1]; 62 UnimplementedDeviceState i2c[3]; 63 UnimplementedDeviceState otp; 64 UnimplementedDeviceState dbus; 65 UnimplementedDeviceState ave0; 66 UnimplementedDeviceState bscsl; 67 UnimplementedDeviceState smi; 68 UnimplementedDeviceState dwc2; 69 UnimplementedDeviceState sdramc; 70 } BCM2835PeripheralState; 71 72 #endif /* BCM2835_PERIPHERALS_H */ 73