2 * Raspberry Pi emulation (c) 2012 Gregory Estrade
3 * Upstreaming code cleanup [including bcm2835_*] (c) 2013 Jan Petrous
5 * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft
6 * Written by Andrew Baumann
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.
15 #include "hw/arm/bcm2835_peripherals.h"
16 #include "hw/intc/bcm2836_control.h"
17 #include "target/arm/cpu.h"
18 #include "qom/object.h"
20 #define TYPE_BCM283X_BASE "bcm283x-base"
21 OBJECT_DECLARE_TYPE(BCM283XBaseState
, BCM283XBaseClass
, BCM283X_BASE
)
22 #define TYPE_BCM283X "bcm283x"
23 OBJECT_DECLARE_SIMPLE_TYPE(BCM283XState
, BCM283X
)
25 #define BCM283X_NCPUS 4
27 /* These type names are for specific SoCs; other than instantiating
28 * them, code using these devices should always handle them via the
29 * BCM283x base class, so they have no BCM2836(obj) etc macros.
31 #define TYPE_BCM2835 "bcm2835"
32 #define TYPE_BCM2836 "bcm2836"
33 #define TYPE_BCM2837 "bcm2837"
35 struct BCM283XBaseState
{
37 DeviceState parent_obj
;
40 uint32_t enabled_cpus
;
45 BCM2836ControlState control
;
48 struct BCM283XBaseClass
{
50 DeviceClass parent_class
;
55 hwaddr peri_base
; /* Peripheral base address seen by the CPU */
56 hwaddr ctrl_base
; /* Interrupt controller and mailboxes etc. */
62 BCM283XBaseState parent_obj
;
64 BCM2835PeripheralState peripherals
;
67 bool bcm283x_common_realize(DeviceState
*dev
, BCMSocPeripheralBaseState
*ps
,
70 #endif /* BCM2836_H */