summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/debug-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-05-31 13:55:16 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2012-05-31 13:57:25 +0200
commita9667636ca56faaeda3242ef0e8486f59158c01b (patch)
treee36f41796d28c475b2d4eedd39d795879caa4026 /firmware/target/arm/imx233/debug-imx233.c
parent64b8d1ed7c68e1805c2e35dbf5be42ff10c3e2a5 (diff)
downloadrockbox-a9667636ca56faaeda3242ef0e8486f59158c01b.tar.gz
rockbox-a9667636ca56faaeda3242ef0e8486f59158c01b.zip
imx233: add ocotp debug screen
Change-Id: Ia2211f9e0b281ffb60139bba539af37d762212dc
Diffstat (limited to 'firmware/target/arm/imx233/debug-imx233.c')
-rw-r--r--firmware/target/arm/imx233/debug-imx233.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c
index c1701397b1..90a9336f05 100644
--- a/firmware/target/arm/imx233/debug-imx233.c
+++ b/firmware/target/arm/imx233/debug-imx233.c
@@ -32,6 +32,7 @@
#include "rtc-imx233.h"
#include "dcp-imx233.h"
#include "pinctrl-imx233.h"
+#include "ocotp-imx233.h"
#include "string.h"
#define DEBUG_CANCEL BUTTON_BACK
@@ -537,12 +538,40 @@ bool dbg_hw_info_pinctrl(void)
}
}
+bool dbg_hw_info_ocotp(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();
+ for(int i = 0; i < 4; i++)
+ lcd_putsf(0, i, "OPS%d=%08x", i, imx233_ocotp_read(&HW_OCOTP_OPSx(i)));
+ 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_info_dcp() && dbg_hw_info_pinctrl() && dbg_hw_info_icoll() &&
- dbg_hw_target_info();
+ dbg_hw_info_ocotp() && dbg_hw_target_info();
}
bool dbg_ports(void)