view include/mailbox.h @ 0:ed10291ff195

first commit
author mir3636
date Sun, 06 Jan 2019 19:27:03 +0900
parents
children
line wrap: on
line source

#define MAILBOX_BASE	(MMIO_VA+0x00B880)

#define MPI_REQUEST 		0x00000000
#define MPI_RESPONSE_OK		0x80000000
#define MPI_RESPONSE_ERR	0x80000001

#define POS_OVERALL_LENGTH	0
#define POS_RV			1
#define POS_TAG			2

#define POS_TAG_ID		0
#define POS_TAG_BUFLEN		1
#define POS_TAG_DATALEN		2
#define POS_TAG_DATA		3


#define MB_HEADER_LENGTH 2
#define TAG_HEADER_LENGTH 3

/* to be extended */
#define MPI_TAG_GET_FIRMWARE		0x00000001
#define MPI_TAG_GET_BOARD_MODEL		0x00010001
#define MPI_TAG_GET_BOARD_REVISION	0x00010002
#define MPI_TAG_GET_MAC_ADDRESS		0x00010003
#define MPI_TAG_GET_BOARD_SERIAL	0x00010004
#define MPI_TAG_GET_ARM_MEMORY		0x00010005
#define MPI_TAG_GET_VC_MEMORY		0x00010006
#define MPI_TAG_GET_CLOCKS		0x00010007
#define MPI_TAG_GET_COMMANDLINE		0x00050001
#define MPI_TAG_GET_DMA_CHANNELS	0x00060001
#define MPI_TAG_GET_POWER_STATE		0x00020001
#define MPI_TAG_SET_POWER_STATE		0x00028001
#define MPI_TAG_GET_TIMING		0x00020002
#define MPI_TAG_GET_FIRMWARE		0x00000001
#define MPI_TAG_GET_CLOCK_STATE		0x00030001
#define MPI_TAG_SET_CLOCK_STATE		0x00038001