Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging
[qemu.git] / include / hw / misc / bcm2835_mbox.h
blob7e8f3ce86de6147f5d27fae53824308685e7f215
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"
12 #define TYPE_BCM2835_MBOX "bcm2835-mbox"
13 #define BCM2835_MBOX(obj) \
14 OBJECT_CHECK(BCM2835MboxState, (obj), TYPE_BCM2835_MBOX)
16 typedef struct {
17 uint32_t reg[MBOX_SIZE];
18 uint32_t count;
19 uint32_t status;
20 uint32_t config;
21 } BCM2835Mbox;
23 typedef struct {
24 /*< private >*/
25 SysBusDevice busdev;
26 /*< public >*/
27 MemoryRegion *mbox_mr;
28 AddressSpace mbox_as;
29 MemoryRegion iomem;
30 qemu_irq arm_irq;
32 bool mbox_irq_disabled;
33 bool available[MBOX_CHAN_COUNT];
34 BCM2835Mbox mbox[2];
35 } BCM2835MboxState;
37 #endif