xref: /openbmc/qemu/include/hw/arm/bcm2836.h (revision df6cf08d)
1bad56236SAndrew Baumann /*
2bad56236SAndrew Baumann  * Raspberry Pi emulation (c) 2012 Gregory Estrade
3bad56236SAndrew Baumann  * Upstreaming code cleanup [including bcm2835_*] (c) 2013 Jan Petrous
4bad56236SAndrew Baumann  *
5bad56236SAndrew Baumann  * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft
6bad56236SAndrew Baumann  * Written by Andrew Baumann
7bad56236SAndrew Baumann  *
86111a0c0SPhilippe Mathieu-Daudé  * This work is licensed under the terms of the GNU GPL, version 2 or later.
96111a0c0SPhilippe Mathieu-Daudé  * See the COPYING file in the top-level directory.
10bad56236SAndrew Baumann  */
11bad56236SAndrew Baumann 
12bad56236SAndrew Baumann #ifndef BCM2836_H
13bad56236SAndrew Baumann #define BCM2836_H
14bad56236SAndrew Baumann 
15bad56236SAndrew Baumann #include "hw/arm/bcm2835_peripherals.h"
16bad56236SAndrew Baumann #include "hw/intc/bcm2836_control.h"
17ec150c7eSMarkus Armbruster #include "target/arm/cpu.h"
18db1015e9SEduardo Habkost #include "qom/object.h"
19bad56236SAndrew Baumann 
20926dcdf0SPeter Maydell #define TYPE_BCM283X "bcm283x"
21a489d195SEduardo Habkost OBJECT_DECLARE_TYPE(BCM283XState, BCM283XClass, BCM283X)
22bad56236SAndrew Baumann 
23926dcdf0SPeter Maydell #define BCM283X_NCPUS 4
24bad56236SAndrew Baumann 
250fd74f03SPeter Maydell /* These type names are for specific SoCs; other than instantiating
260fd74f03SPeter Maydell  * them, code using these devices should always handle them via the
270fd74f03SPeter Maydell  * BCM283x base class, so they have no BCM2836(obj) etc macros.
280fd74f03SPeter Maydell  */
29*df6cf08dSPhilippe Mathieu-Daudé #define TYPE_BCM2835 "bcm2835"
300fd74f03SPeter Maydell #define TYPE_BCM2836 "bcm2836"
310fd74f03SPeter Maydell #define TYPE_BCM2837 "bcm2837"
320fd74f03SPeter Maydell 
33db1015e9SEduardo Habkost struct BCM283XState {
34bad56236SAndrew Baumann     /*< private >*/
35bad56236SAndrew Baumann     DeviceState parent_obj;
36bad56236SAndrew Baumann     /*< public >*/
37bad56236SAndrew Baumann 
38bad56236SAndrew Baumann     uint32_t enabled_cpus;
39bad56236SAndrew Baumann 
405e5e9ed6SPhilippe Mathieu-Daudé     struct {
415e5e9ed6SPhilippe Mathieu-Daudé         ARMCPU core;
425e5e9ed6SPhilippe Mathieu-Daudé     } cpu[BCM283X_NCPUS];
43bad56236SAndrew Baumann     BCM2836ControlState control;
44bad56236SAndrew Baumann     BCM2835PeripheralState peripherals;
45db1015e9SEduardo Habkost };
46bad56236SAndrew Baumann 
47bad56236SAndrew Baumann #endif /* BCM2836_H */
48