imx233: add DCP driver (only memcpy implemented), move channel arbiter to kernel-imx233

Change-Id: I2bc5a49459c354027fc67a880bbf3b87c942bdd0
This commit is contained in:
Amaury Pouly 2012-01-15 01:38:41 +01:00
parent 8cadb587e8
commit 35ba39e57f
8 changed files with 663 additions and 52 deletions

View file

@ -30,6 +30,7 @@
#include "clkctrl-imx233.h"
#include "powermgmt-imx233.h"
#include "rtc-imx233.h"
#include "dcp-imx233.h"
#include "string.h"
#define DEBUG_CANCEL BUTTON_BACK
@ -347,11 +348,57 @@ bool dbg_hw_info_rtc(void)
}
}
bool dbg_hw_info_dcp(void)
{
lcd_setfont(FONT_SYSFIXED);
while(1)
{
int button = get_action(CONTEXT_STD, HZ / 10);
switch(button)
{
case ACTION_STD_NEXT:
case ACTION_STD_PREV:
case ACTION_STD_OK:
case ACTION_STD_MENU:
lcd_setfont(FONT_UI);
return true;
case ACTION_STD_CANCEL:
lcd_setfont(FONT_UI);
return false;
}
lcd_clear_display();
struct imx233_dcp_info_t info = imx233_dcp_get_info(DCP_INFO_ALL);
lcd_putsf(0, 0, "crypto: %d csc: %d", info.has_crypto, info.has_csc);
lcd_putsf(0, 1, "keys: %d channels: %d", info.num_keys, info.num_channels);
lcd_putsf(0, 2, "ciphers: 0x%lx hash: 0x%lx", info.ciphers, info.hashs);
lcd_putsf(0, 3, "gather wr: %d otp rdy: %d ch0merged: %d",
info.gather_writes, info.otp_key_ready, info.ch0_merged);
lcd_putsf(0, 4, "ctx switching: %d caching: %d", info.context_switching,
info.context_caching);
lcd_putsf(0, 5, "ch irq ien en rdy pri sem cmdptr");
int nr = HW_DCP_NUM_CHANNELS;
for(int i = 0; i < nr; i++)
{
lcd_putsf(0, 6 + i, "%d %d %d %d %d %d %d 0x%08lx",
i, info.channel[i].irq, info.channel[i].irq_en, info.channel[i].enable,
info.channel[i].ready, info.channel[i].high_priority,
info.channel[i].sema, info.channel[i].cmdptr);
}
lcd_putsf(0, 6 + nr, "csc %d %d %d %d",
info.csc.irq, info.csc.irq_en, info.csc.enable, info.csc.priority);
lcd_update();
yield();
}
}
bool dbg_hw_info(void)
{
return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() &&
dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() &&
dbg_hw_target_info();
dbg_hw_info_dcp() && dbg_hw_target_info();
}
bool dbg_ports(void)