summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8700/debug-s5l8700.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8700/debug-s5l8700.c')
-rw-r--r--firmware/target/arm/s5l8700/debug-s5l8700.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/firmware/target/arm/s5l8700/debug-s5l8700.c b/firmware/target/arm/s5l8700/debug-s5l8700.c
index e318dbf2da..ecb15df5d0 100644
--- a/firmware/target/arm/s5l8700/debug-s5l8700.c
+++ b/firmware/target/arm/s5l8700/debug-s5l8700.c
@@ -32,6 +32,10 @@
32#include "pmu-target.h" 32#include "pmu-target.h"
33#include "nand-target.h" 33#include "nand-target.h"
34#endif 34#endif
35#ifdef HAVE_SERIAL
36#include "uart-target.h"
37#include "uc870x.h"
38#endif
35 39
36#define DEBUG_CANCEL BUTTON_MENU 40#define DEBUG_CANCEL BUTTON_MENU
37 41
@@ -49,7 +53,11 @@ bool dbg_hw_info(void)
49 int i; 53 int i;
50#ifdef IPOD_NANO2G 54#ifdef IPOD_NANO2G
51 unsigned int state = 0; 55 unsigned int state = 0;
56#ifdef UC870X_DEBUG
57 const unsigned int max_states=3;
58#else
52 const unsigned int max_states=2; 59 const unsigned int max_states=2;
60#endif
53 int nand_bank_count; 61 int nand_bank_count;
54 struct storage_info info; 62 struct storage_info info;
55 const struct nand_device_info_type *nand_devicetype[4]; 63 const struct nand_device_info_type *nand_devicetype[4];
@@ -123,6 +131,37 @@ bool dbg_hw_info(void)
123 _DEBUG_PRINTF("backlight: %s", pmu_read(0x29) ? "on" : "off"); 131 _DEBUG_PRINTF("backlight: %s", pmu_read(0x29) ? "on" : "off");
124 _DEBUG_PRINTF("brightness value: %d", pmu_read(0x28)); 132 _DEBUG_PRINTF("brightness value: %d", pmu_read(0x28));
125 } 133 }
134#ifdef UC870X_DEBUG
135 else if(state==2)
136 {
137 extern struct uartc_port ser_port;
138 int tx_stat, rx_stat, tx_speed, rx_speed;
139 char line_cfg[4];
140 int abr_stat;
141 uint32_t abr_cnt;
142 char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
143
144 uartc_port_get_line_info(&ser_port,
145 &tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg);
146 abr_stat = uartc_port_get_abr_info(&ser_port, &abr_cnt);
147
148 _DEBUG_PRINTF("UART %d:", ser_port.id);
149 line++;
150 _DEBUG_PRINTF("line: %s", line_cfg);
151 _DEBUG_PRINTF("Tx: %s, speed: %d", tx_stat ? "On":"Off", tx_speed);
152 _DEBUG_PRINTF("Rx: %s, speed: %d", rx_stat ? "On":"Off", rx_speed);
153 _DEBUG_PRINTF("ABR: %s, cnt: %u", abrstatus[abr_stat], abr_cnt);
154 line++;
155 _DEBUG_PRINTF("n_tx_bytes: %u", ser_port.n_tx_bytes);
156 _DEBUG_PRINTF("n_rx_bytes: %u", ser_port.n_rx_bytes);
157 _DEBUG_PRINTF("n_ovr_err: %u", ser_port.n_ovr_err);
158 _DEBUG_PRINTF("n_parity_err: %u", ser_port.n_parity_err);
159 _DEBUG_PRINTF("n_frame_err: %u", ser_port.n_frame_err);
160 _DEBUG_PRINTF("n_break_detect: %u", ser_port.n_break_detect);
161 _DEBUG_PRINTF("ABR n_abnormal: %u %u",
162 ser_port.n_abnormal0, ser_port.n_abnormal1);
163 }
164#endif
126 else 165 else
127 { 166 {
128 state=0; 167 state=0;