diff options
Diffstat (limited to 'firmware/target/arm/imx233/debug-imx233.c')
-rw-r--r-- | firmware/target/arm/imx233/debug-imx233.c | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c index 51d306b7b1..7db7ee97d7 100644 --- a/firmware/target/arm/imx233/debug-imx233.c +++ b/firmware/target/arm/imx233/debug-imx233.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include "clkctrl-imx233.h" | 30 | #include "clkctrl-imx233.h" |
31 | #include "powermgmt-imx233.h" | 31 | #include "powermgmt-imx233.h" |
32 | #include "rtc-imx233.h" | 32 | #include "rtc-imx233.h" |
33 | #include "dcp-imx233.h" | ||
33 | #include "string.h" | 34 | #include "string.h" |
34 | 35 | ||
35 | #define DEBUG_CANCEL BUTTON_BACK | 36 | #define DEBUG_CANCEL BUTTON_BACK |
@@ -347,11 +348,57 @@ bool dbg_hw_info_rtc(void) | |||
347 | } | 348 | } |
348 | } | 349 | } |
349 | 350 | ||
351 | bool dbg_hw_info_dcp(void) | ||
352 | { | ||
353 | lcd_setfont(FONT_SYSFIXED); | ||
354 | |||
355 | while(1) | ||
356 | { | ||
357 | int button = get_action(CONTEXT_STD, HZ / 10); | ||
358 | switch(button) | ||
359 | { | ||
360 | case ACTION_STD_NEXT: | ||
361 | case ACTION_STD_PREV: | ||
362 | case ACTION_STD_OK: | ||
363 | case ACTION_STD_MENU: | ||
364 | lcd_setfont(FONT_UI); | ||
365 | return true; | ||
366 | case ACTION_STD_CANCEL: | ||
367 | lcd_setfont(FONT_UI); | ||
368 | return false; | ||
369 | } | ||
370 | |||
371 | lcd_clear_display(); | ||
372 | struct imx233_dcp_info_t info = imx233_dcp_get_info(DCP_INFO_ALL); | ||
373 | |||
374 | lcd_putsf(0, 0, "crypto: %d csc: %d", info.has_crypto, info.has_csc); | ||
375 | lcd_putsf(0, 1, "keys: %d channels: %d", info.num_keys, info.num_channels); | ||
376 | lcd_putsf(0, 2, "ciphers: 0x%lx hash: 0x%lx", info.ciphers, info.hashs); | ||
377 | lcd_putsf(0, 3, "gather wr: %d otp rdy: %d ch0merged: %d", | ||
378 | info.gather_writes, info.otp_key_ready, info.ch0_merged); | ||
379 | lcd_putsf(0, 4, "ctx switching: %d caching: %d", info.context_switching, | ||
380 | info.context_caching); | ||
381 | lcd_putsf(0, 5, "ch irq ien en rdy pri sem cmdptr"); | ||
382 | int nr = HW_DCP_NUM_CHANNELS; | ||
383 | for(int i = 0; i < nr; i++) | ||
384 | { | ||
385 | lcd_putsf(0, 6 + i, "%d %d %d %d %d %d %d 0x%08lx", | ||
386 | i, info.channel[i].irq, info.channel[i].irq_en, info.channel[i].enable, | ||
387 | info.channel[i].ready, info.channel[i].high_priority, | ||
388 | info.channel[i].sema, info.channel[i].cmdptr); | ||
389 | } | ||
390 | lcd_putsf(0, 6 + nr, "csc %d %d %d %d", | ||
391 | info.csc.irq, info.csc.irq_en, info.csc.enable, info.csc.priority); | ||
392 | lcd_update(); | ||
393 | yield(); | ||
394 | } | ||
395 | } | ||
396 | |||
350 | bool dbg_hw_info(void) | 397 | bool dbg_hw_info(void) |
351 | { | 398 | { |
352 | return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && | 399 | return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && |
353 | dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() && | 400 | dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() && |
354 | dbg_hw_target_info(); | 401 | dbg_hw_info_dcp() && dbg_hw_target_info(); |
355 | } | 402 | } |
356 | 403 | ||
357 | bool dbg_ports(void) | 404 | bool dbg_ports(void) |