1 /*
2  * Raspberry Pi emulation (c) 2012 Gregory Estrade
3  * This code is licensed under the GNU GPLv2 and later.
4  */
5 
6 #ifndef BCM2835_MBOX_DEFS_H
7 #define BCM2835_MBOX_DEFS_H
8 
9 /* Constants shared with the ARM identifying separate mailbox channels */
10 #define MBOX_CHAN_POWER    0 /* for use by the power management interface */
11 #define MBOX_CHAN_FB       1 /* for use by the frame buffer */
12 #define MBOX_CHAN_VCHIQ    3 /* for use by the VCHIQ interface */
13 #define MBOX_CHAN_PROPERTY 8 /* for use by the property channel */
14 #define MBOX_CHAN_COUNT    9
15 
16 #define MBOX_SIZE          32
17 #define MBOX_INVALID_DATA  0x0f
18 
19 /* Layout of the private address space used for communication between
20  * the mbox device emulation, and child devices: each channel occupies
21  * 16 bytes of address space, but only two registers are presently defined.
22  */
23 #define MBOX_AS_CHAN_SHIFT 4
24 #define MBOX_AS_DATA       0 /* request / response data (RW at offset 0) */
25 #define MBOX_AS_PENDING    4 /* pending response status (RO at offset 4) */
26 
27 #endif /* BCM2835_MBOX_DEFS_H */
28