提交 0279daee 编写于 作者: B bigmagic

add raspi3 mbox driver

上级 d5f83970
......@@ -6,6 +6,7 @@ cwd = GetCurrentDir()
src = Split('''
board.c
drv_uart.c
mbox.c
''')
CPPPATH = [cwd]
......
......@@ -99,6 +99,7 @@ void rt_hw_board_init(void)
armv8_map(0x3f200000, 0x3f200000, 0x16000, MEM_ATTR_IO);//uart
armv8_map(0x40000000, 0x40000000, 0x1000, MEM_ATTR_IO);//core timer
armv8_map(0x3F300000, 0x3F300000, 0x1000, MEM_ATTR_IO);//sdio
armv8_map(0xc00000, 0xc00000, 0x1000, MEM_ATTR_IO);//mbox
mmu_enable();
/* initialize hardware interrupt */
......
......@@ -17,10 +17,6 @@ volatile unsigned int *mbox = (volatile unsigned int *) MBOX_ADDR;
/**
* Make a mailbox call. Returns 0 on failure, non-zero on success
*/
void init_mbox_mmu_map(){
rt_hw_change_mmu_table(MBOX_ADDR, 96, MBOX_ADDR, STRONG_ORDER_MEM);
}
int mbox_call(unsigned char ch, int mmu_enable)
{
unsigned int r = (((MBOX_ADDR)&~0xF) | (ch&0xF));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册