summaryrefslogtreecommitdiff
path: root/common/lightbar.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-11-20 12:08:50 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-11-21 06:23:16 +0000
commite55bac2214f87ee59ef60960dee85fbebd13f6e9 (patch)
treea27cd23e7275cc88142929322a34ac20a646b976 /common/lightbar.c
parente0c80ace56989937602960f53381fe160a355640 (diff)
downloadchrome-ec-e55bac2214f87ee59ef60960dee85fbebd13f6e9.tar.gz
Improve EC console messages for lightbar stuff
I need more information to find the source of some problems. This just adds a little more context to the lightbar console messages. BUG=chrome-os-partner:33401 BRANCH=ToT,samus TEST=make buildall -j Signed-off-by: Bill Richardson <wfrichar@chromium.org> Change-Id: I97a210754833c9384eae517f9df2e97d3a9ea6b4 Reviewed-on: https://chromium-review.googlesource.com/231136 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/lightbar.c')
-rw-r--r--common/lightbar.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/common/lightbar.c b/common/lightbar.c
index 5ae8ca5167..0300be2911 100644
--- a/common/lightbar.c
+++ b/common/lightbar.c
@@ -657,15 +657,13 @@ static uint32_t sequence_STOP(void)
do {
msg = TASK_EVENT_CUSTOM(task_wait_event(-1));
- CPRINTS("LB_stop got pending_msg %d", pending_msg);
+ CPRINTS("LB %s() got pending_msg %d", __func__, pending_msg);
} while (msg != PENDING_MSG || (
pending_msg != LIGHTBAR_RUN &&
pending_msg != LIGHTBAR_S0S3 &&
pending_msg != LIGHTBAR_S3 &&
pending_msg != LIGHTBAR_S3S5 &&
pending_msg != LIGHTBAR_S5));
-
- CPRINTS("LB_stop->running");
return 0;
}
@@ -1392,19 +1390,23 @@ void lightbar_task(void)
lightbar_restore_state();
while (1) {
- CPRINTS("LB task %d = %s",
- st.cur_seq, lightbar_cmds[st.cur_seq].string);
+ CPRINTS("LB running cur_seq %d %s. prev_seq %d %s",
+ st.cur_seq, lightbar_cmds[st.cur_seq].string,
+ st.prev_seq, lightbar_cmds[st.prev_seq].string);
msg = lightbar_cmds[st.cur_seq].sequence();
if (TASK_EVENT_CUSTOM(msg) == PENDING_MSG) {
- CPRINTS("LB msg %d = %s", pending_msg,
- lightbar_cmds[pending_msg].string);
+ CPRINTS("LB cur_seq %d %s returned pending msg %d %s",
+ st.cur_seq, lightbar_cmds[st.cur_seq].string,
+ pending_msg, lightbar_cmds[pending_msg].string);
if (st.cur_seq != pending_msg) {
if (is_normal_sequence(st.cur_seq))
st.prev_seq = st.cur_seq;
st.cur_seq = pending_msg;
}
} else {
- CPRINTS("LB msg 0x%x", msg);
+ CPRINTS("LB cur_seq %d %s returned value %d",
+ st.cur_seq, lightbar_cmds[st.cur_seq].string,
+ msg);
switch (st.cur_seq) {
case LIGHTBAR_S5S3:
st.cur_seq = LIGHTBAR_S3;
@@ -1433,17 +1435,17 @@ void lightbar_task(void)
}
/* Function to request a preset sequence from the lightbar task. */
-void lightbar_sequence(enum lightbar_sequence num)
+void lightbar_sequence_f(enum lightbar_sequence num, const char *f)
{
if (num > 0 && num < LIGHTBAR_NUM_SEQUENCES) {
- CPRINTS("LB_seq %d = %s", num,
+ CPRINTS("LB %s() requests %d %s", f, num,
lightbar_cmds[num].string);
pending_msg = num;
task_set_event(TASK_ID_LIGHTBAR,
- TASK_EVENT_WAKE | TASK_EVENT_CUSTOM(PENDING_MSG),
+ TASK_EVENT_CUSTOM(PENDING_MSG),
0);
} else
- CPRINTS("LB_seq %d - ignored", num);
+ CPRINTS("LB %s() requests %d - ignored", f, num);
}
/****************************************************************************/