15 void add_mailbox_tag(
volatile uint32_t*, uint32_t, uint32_t, uint32_t, uint32_t*);
17 void dump_response(
volatile uint32_t*,
const char*,
int);
18 void print_parameter(
volatile uint32_t*,
const char*, uint32_t,
int);
22 #define MAILBOX_REGS_BASE (PERIPHERALS_BASE + 0xB880)
24 static volatile uint *
const mailbox_regs = (
volatile uint*)MAILBOX_REGS_BASE;
27 #define MAILBOX_READ 0
28 #define MAILBOX_STATUS 6
29 #define MAILBOX_WRITE 8
32 #define MAILBOX_FULL 0x80000000
33 #define MAILBOX_EMPTY 0x40000000
36 #define MAILBOX_CHANNEL_POWER_MGMT 0
37 #define MAILBOX_CHANNEL_1 1
42 #define MAILBOX_CHANNEL_MASK 0xf
47 #define MBOX_BUFLEN 1024
50 #define RR_REQUEST 0x00000000
51 #define RR_RESPONSE_OK 0x80000000
52 #define RR_RESPONSE_ERROR 0x80000001
54 #define SLOT_OVERALL_LENGTH 0
56 #define SLOT_TAGSTART 2
59 #define SLOT_TAG_BUFLEN 1
60 #define SLOT_TAG_DATALEN 2
61 #define SLOT_TAG_DATA 3
63 #define MBOX_HEADER_LENGTH 2
64 #define TAG_HEADER_LENGTH 3
66 #define MBX_DEVICE_SDCARD 0x00000000
67 #define MBX_DEVICE_UART0 0x00000001
68 #define MBX_DEVICE_UART1 0x00000002
69 #define MBX_DEVICE_USBHCD 0x00000003
70 #define MBX_DEVICE_I2C0 0x00000004
71 #define MBX_DEVICE_I2C1 0x00000005
72 #define MBX_DEVICE_I2C2 0x00000006
73 #define MBX_DEVICE_SPI 0x00000007
74 #define MBX_DEVICE_CCP2TX 0x00000008
77 #define MBX_TAG_GET_FIRMWARE 0x00000001
78 #define MBX_TAG_GET_BOARD_MODEL 0x00010001
79 #define MBX_TAG_GET_BOARD_REVISION 0x00010002
80 #define MBX_TAG_GET_MAC_ADDRESS 0x00010003
81 #define MBX_TAG_GET_BOARD_SERIAL 0x00010004
82 #define MBX_TAG_GET_ARM_MEMORY 0x00010005
83 #define MBX_TAG_GET_VC_MEMORY 0x00010006
84 #define MBX_TAG_GET_COMMANDLINE 0x00050001
85 #define MBX_TAG_GET_DMA_CHANNELS 0x00060001
86 #define MBX_TAG_GET_POWER_STATE 0x00020001
87 #define MBX_TAG_GET_TIMING 0x00020002
88 #define MBX_TAG_GET_FIRMWARE 0x00000001
void add_mailbox_tag(volatile uint32_t *buffer, uint32_t tag, uint32_t buflen, uint32_t len, uint32_t *data)
Definition: bcm2837_mbox.c:27
void bcm2837_mailbox_write(uint, uint)
Definition: bcm2837_power.c:19
uint bcm2837_mailbox_read(uint)
Definition: bcm2837_power.c:35
void build_mailbox_request(volatile uint32_t *mailbuffer)
Definition: bcm2837_mbox.c:53
void get_mac_mailbox(volatile uint32_t *mailbuffer)
Definition: bcm2837_mbox.c:67