hw/arm/virt: fix max-cpus check
[qemu/ar7.git] / include / hw / misc / bcm2835_mbox.h
blobf4e9ff9ef6d453251749cc0f17fe4db98e70bb41
1 /*
2 * Raspberry Pi emulation (c) 2012 Gregory Estrade
3 * This code is licensed under the GNU GPLv2 and later.
4 */
6 #ifndef BCM2835_MBOX_H
7 #define BCM2835_MBOX_H
9 #include "bcm2835_mbox_defs.h"
10 #include "hw/sysbus.h"
11 #include "exec/address-spaces.h"
13 #define TYPE_BCM2835_MBOX "bcm2835-mbox"
14 #define BCM2835_MBOX(obj) \
15 OBJECT_CHECK(BCM2835MboxState, (obj), TYPE_BCM2835_MBOX)
17 typedef struct {
18 uint32_t reg[MBOX_SIZE];
19 uint32_t count;
20 uint32_t status;
21 uint32_t config;
22 } BCM2835Mbox;
24 typedef struct {
25 /*< private >*/
26 SysBusDevice busdev;
27 /*< public >*/
28 MemoryRegion *mbox_mr;
29 AddressSpace mbox_as;
30 MemoryRegion iomem;
31 qemu_irq arm_irq;
33 bool mbox_irq_disabled;
34 bool available[MBOX_CHAN_COUNT];
35 BCM2835Mbox mbox[2];
36 } BCM2835MboxState;
38 #endif