summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8702/debug-s5l8702.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8702/debug-s5l8702.c')
-rw-r--r--firmware/target/arm/s5l8702/debug-s5l8702.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/firmware/target/arm/s5l8702/debug-s5l8702.c b/firmware/target/arm/s5l8702/debug-s5l8702.c
index 291c809bce..614019bac1 100644
--- a/firmware/target/arm/s5l8702/debug-s5l8702.c
+++ b/firmware/target/arm/s5l8702/debug-s5l8702.c
@@ -31,7 +31,8 @@
31#include "pmu-target.h" 31#include "pmu-target.h"
32#include "pcm-target.h" 32#include "pcm-target.h"
33#ifdef HAVE_SERIAL 33#ifdef HAVE_SERIAL
34#include "uc8702.h" 34#include "uart-target.h"
35#include "uc870x.h"
35#endif 36#endif
36#include "clocking-s5l8702.h" 37#include "clocking-s5l8702.h"
37 38
@@ -50,7 +51,7 @@ bool dbg_hw_info(void)
50 int line; 51 int line;
51 int i; 52 int i;
52 unsigned int state = 0; 53 unsigned int state = 0;
53#ifdef UC8702_DEBUG 54#ifdef UC870X_DEBUG
54 const unsigned int max_states=3; 55 const unsigned int max_states=3;
55#else 56#else
56 const unsigned int max_states=2; 57 const unsigned int max_states=2;
@@ -120,20 +121,18 @@ bool dbg_hw_info(void)
120 _DEBUG_PRINTF("backlight: %s", pmu_read(0x29) ? "on" : "off"); 121 _DEBUG_PRINTF("backlight: %s", pmu_read(0x29) ? "on" : "off");
121 _DEBUG_PRINTF("brightness value: %d", pmu_read(0x28)); 122 _DEBUG_PRINTF("brightness value: %d", pmu_read(0x28));
122 } 123 }
123#ifdef UC8702_DEBUG 124#ifdef UC870X_DEBUG
124 else if(state==2) 125 else if(state==2)
125 { 126 {
126 extern struct uartc_port ser_port; 127 extern struct uartc_port ser_port;
127 int tx_stat, rx_stat, tx_speed, rx_speed; 128 int tx_stat, rx_stat, tx_speed, rx_speed;
128 char line_cfg[4]; 129 char line_cfg[4];
129 int abr_stat; 130 int abr_stat;
130 unsigned int abr_cnt; 131 uint32_t abr_cnt;
131
132 char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"}; 132 char *abrstatus[] = {"Idle", "Launched", "Counting", "Abnormal"};
133 133
134 uartc_port_get_line_info(&ser_port, &tx_stat, &rx_stat, 134 uartc_port_get_line_info(&ser_port,
135 &tx_speed, &rx_speed, line_cfg); 135 &tx_stat, &rx_stat, &tx_speed, &rx_speed, line_cfg);
136
137 abr_stat = uartc_port_get_abr_info(&ser_port, &abr_cnt); 136 abr_stat = uartc_port_get_abr_info(&ser_port, &abr_cnt);
138 137
139 _DEBUG_PRINTF("UART %d:", ser_port.id); 138 _DEBUG_PRINTF("UART %d:", ser_port.id);
@@ -141,7 +140,7 @@ bool dbg_hw_info(void)
141 _DEBUG_PRINTF("line: %s", line_cfg); 140 _DEBUG_PRINTF("line: %s", line_cfg);
142 _DEBUG_PRINTF("Tx: %s, speed: %d", tx_stat ? "On":"Off", tx_speed); 141 _DEBUG_PRINTF("Tx: %s, speed: %d", tx_stat ? "On":"Off", tx_speed);
143 _DEBUG_PRINTF("Rx: %s, speed: %d", rx_stat ? "On":"Off", rx_speed); 142 _DEBUG_PRINTF("Rx: %s, speed: %d", rx_stat ? "On":"Off", rx_speed);
144 _DEBUG_PRINTF("ABR: %s, cnt: %d", abrstatus[abr_stat], abr_cnt); 143 _DEBUG_PRINTF("ABR: %s, cnt: %u", abrstatus[abr_stat], abr_cnt);
145 line++; 144 line++;
146 _DEBUG_PRINTF("n_tx_bytes: %u", ser_port.n_tx_bytes); 145 _DEBUG_PRINTF("n_tx_bytes: %u", ser_port.n_tx_bytes);
147 _DEBUG_PRINTF("n_rx_bytes: %u", ser_port.n_rx_bytes); 146 _DEBUG_PRINTF("n_rx_bytes: %u", ser_port.n_rx_bytes);
@@ -149,10 +148,8 @@ bool dbg_hw_info(void)
149 _DEBUG_PRINTF("n_parity_err: %u", ser_port.n_parity_err); 148 _DEBUG_PRINTF("n_parity_err: %u", ser_port.n_parity_err);
150 _DEBUG_PRINTF("n_frame_err: %u", ser_port.n_frame_err); 149 _DEBUG_PRINTF("n_frame_err: %u", ser_port.n_frame_err);
151 _DEBUG_PRINTF("n_break_detect: %u", ser_port.n_break_detect); 150 _DEBUG_PRINTF("n_break_detect: %u", ser_port.n_break_detect);
152 _DEBUG_PRINTF("n_abnormal0: %u", ser_port.n_abnormal0); 151 _DEBUG_PRINTF("ABR n_abnormal: %u %u",
153 _DEBUG_PRINTF("n_abnormal1: %u", ser_port.n_abnormal1); 152 ser_port.n_abnormal0, ser_port.n_abnormal1);
154
155 sleep(HZ/20);
156 } 153 }
157#endif 154#endif
158 else 155 else