Add BCM2708 mailbox definitions and implementation.

The mailbox is used to communicate with the VideoCore on the rPi for
various tasks. First it will be used to configure the framebuffer.
This commit is contained in:
Michael Lotz
2012-11-27 20:58:30 +01:00
parent 5db97b2668
commit 4818400fcf
4 changed files with 114 additions and 0 deletions
+27
View File
@@ -40,6 +40,18 @@
#define BCM2708_SDRAM_BASE 0x00000000
#define BCM2708_PERIPHERAL_BASE 0x20000000
// Added to physical addresses to select the different cache behaviours
#define BCM2708_VIDEO_CORE_L1_L2_CACHED (0 << 30)
#define BCM2708_VIDEO_CORE_L2_COHERENT (1 << 30)
#define BCM2708_VIDEO_CORE_L2_CACHED (2 << 30)
#define BCM2708_VIDEO_CORE_UNCACHED (3 << 30)
// The highest two bits are used to select aliases to the physical memory
// with different cache semantic. Clearing them converts the address to
// physical memory as seen by ARM.
#define BCM2708_BUS_TO_PHYSICAL(x) (x & ~BCM2708_VIDEO_CORE_UNCACHED)
#define ST_BASE 0x3000
// System Timer, sec 12.0, page 172
#define DMA_BASE 0x7000
@@ -122,4 +134,19 @@
#define UART_SYSC 20
/* Mailbox */
#define ARM_CTRL_0_MAILBOX_BASE (ARM_CTRL_0_SBM_BASE + 0x80)
#define ARM_MAILBOX_READ 0x00
#define ARM_MAILBOX_STATUS 0x18
#define ARM_MAILBOX_WRITE 0x20
#define ARM_MAILBOX_FULL (1 << 31)
#define ARM_MAILBOX_EMPTY (1 << 30)
#define ARM_MAILBOX_DATA_MASK 0xfffffff0
#define ARM_MAILBOX_CHANNEL_MASK 0x0000000f
#define ARM_MAILBOX_CHANNEL_FRAMEBUFFER 1
#endif /* __PLATFORM_BCM2708_H */