]> git.proxmox.com Git - mirror_qemu.git/blame - include/hw/arm/bcm2836.h
Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into...
[mirror_qemu.git] / include / hw / arm / bcm2836.h
CommitLineData
bad56236
AB
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 BCM2836_H
12#define BCM2836_H
13
14#include "hw/arm/arm.h"
15#include "hw/arm/bcm2835_peripherals.h"
16#include "hw/intc/bcm2836_control.h"
17
926dcdf0
PM
18#define TYPE_BCM283X "bcm283x"
19#define BCM283X(obj) OBJECT_CHECK(BCM283XState, (obj), TYPE_BCM283X)
bad56236 20
926dcdf0 21#define BCM283X_NCPUS 4
bad56236 22
0fd74f03
PM
23/* These type names are for specific SoCs; other than instantiating
24 * them, code using these devices should always handle them via the
25 * BCM283x base class, so they have no BCM2836(obj) etc macros.
26 */
27#define TYPE_BCM2836 "bcm2836"
28#define TYPE_BCM2837 "bcm2837"
29
926dcdf0 30typedef struct BCM283XState {
bad56236
AB
31 /*< private >*/
32 DeviceState parent_obj;
33 /*< public >*/
34
d9f8bbd8 35 char *cpu_type;
bad56236
AB
36 uint32_t enabled_cpus;
37
926dcdf0 38 ARMCPU cpus[BCM283X_NCPUS];
bad56236
AB
39 BCM2836ControlState control;
40 BCM2835PeripheralState peripherals;
926dcdf0 41} BCM283XState;
bad56236 42
0fd74f03
PM
43typedef struct BCM283XInfo BCM283XInfo;
44
45typedef struct BCM283XClass {
46 DeviceClass parent_class;
47 const BCM283XInfo *info;
48} BCM283XClass;
49
50#define BCM283X_CLASS(klass) \
51 OBJECT_CLASS_CHECK(BCM283XClass, (klass), TYPE_BCM283X)
52#define BCM283X_GET_CLASS(obj) \
53 OBJECT_GET_CLASS(BCM283XClass, (obj), TYPE_BCM283X)
54
bad56236 55#endif /* BCM2836_H */