summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/debug-imx233.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/debug-imx233.c')
-rw-r--r--firmware/target/arm/imx233/debug-imx233.c39
1 files changed, 38 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/debug-imx233.c b/firmware/target/arm/imx233/debug-imx233.c
index 84d68a780d..e350b5a8ba 100644
--- a/firmware/target/arm/imx233/debug-imx233.c
+++ b/firmware/target/arm/imx233/debug-imx233.c
@@ -34,6 +34,7 @@
34#include "pinctrl-imx233.h" 34#include "pinctrl-imx233.h"
35#include "ocotp-imx233.h" 35#include "ocotp-imx233.h"
36#include "pwm-imx233.h" 36#include "pwm-imx233.h"
37#include "emi-imx233.h"
37#include "string.h" 38#include "string.h"
38#include "stdio.h" 39#include "stdio.h"
39 40
@@ -732,12 +733,48 @@ bool dbg_hw_info_usb(void)
732 } 733 }
733} 734}
734 735
736bool dbg_hw_info_emi(void)
737{
738 lcd_setfont(FONT_SYSFIXED);
739
740 while(1)
741 {
742 int button = get_action(CONTEXT_STD, HZ / 10);
743 switch(button)
744 {
745 case ACTION_STD_NEXT:
746 case ACTION_STD_PREV:
747 case ACTION_STD_OK:
748 case ACTION_STD_MENU:
749 lcd_setfont(FONT_UI);
750 return true;
751 case ACTION_STD_CANCEL:
752 lcd_setfont(FONT_UI);
753 return false;
754 }
755
756 lcd_clear_display();
757 struct imx233_emi_info_t info = imx233_emi_get_info();
758 int line = 0;
759 lcd_putsf(0, line++, "EMI");
760 lcd_putsf(0, line++, "rows: %d", info.rows);
761 lcd_putsf(0, line++, "columns: %d", info.columns);
762 lcd_putsf(0, line++, "banks: %d", info.banks);
763 lcd_putsf(0, line++, "chips: %d", info.chips);
764 lcd_putsf(0, line++, "size: %d MiB", info.size / 1024 / 1024);
765 lcd_putsf(0, line++, "cas: %d.%d", info.cas / 2, 5 * (info.cas % 2));
766
767 lcd_update();
768 yield();
769 }
770}
771
735bool dbg_hw_info(void) 772bool dbg_hw_info(void)
736{ 773{
737 return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() && 774 return dbg_hw_info_clkctrl() && dbg_hw_info_dma() && dbg_hw_info_adc() &&
738 dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() && 775 dbg_hw_info_power() && dbg_hw_info_powermgmt() && dbg_hw_info_rtc() &&
739 dbg_hw_info_dcp() && dbg_hw_info_pinctrl() && dbg_hw_info_icoll() && 776 dbg_hw_info_dcp() && dbg_hw_info_pinctrl() && dbg_hw_info_icoll() &&
740 dbg_hw_info_ocotp() && dbg_hw_info_pwm() && dbg_hw_info_usb() && 777 dbg_hw_info_ocotp() && dbg_hw_info_pwm() && dbg_hw_info_usb() && dbg_hw_info_emi() &&
741 dbg_hw_target_info(); 778 dbg_hw_target_info();
742} 779}
743 780