summaryrefslogtreecommitdiff
path: root/chip/lm4
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-03-05 16:57:21 -0800
committerRandall Spangler <rspangler@chromium.org>2012-03-06 09:28:47 -0800
commit7e508c0d34a2c67b6b83bcddcd2b8c06ad41f1ab (patch)
tree5add75daa7bcc32146c7c9c2c108d98161345cb1 /chip/lm4
parent526db244e442b593315242bfc9b627754fedb902 (diff)
downloadchrome-ec-7e508c0d34a2c67b6b83bcddcd2b8c06ad41f1ab.tar.gz
Clean up debug console output
Also prints the current timer value when inits are done, and when the watchdog task first gets to run (after all higher priority tasks sleep at least once). Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=none Change-Id: I342f86ad087fd18ab064a10a5bcdd0b69ee373d0
Diffstat (limited to 'chip/lm4')
-rw-r--r--chip/lm4/keyboard_scan.c10
-rw-r--r--chip/lm4/watchdog.c5
2 files changed, 10 insertions, 5 deletions
diff --git a/chip/lm4/keyboard_scan.c b/chip/lm4/keyboard_scan.c
index 3729a304f5..2966713768 100644
--- a/chip/lm4/keyboard_scan.c
+++ b/chip/lm4/keyboard_scan.c
@@ -160,7 +160,7 @@ static uint32_t clear_matrix_interrupt_status(void) {
static void wait_for_interrupt(void)
{
- uart_printf("[kbscan %s()]\n", __func__);
+ uart_puts("[KB wait]\n");
/* Assert all outputs would trigger un-wanted interrupts.
* Clear them before enable interrupt. */
@@ -175,7 +175,7 @@ static void wait_for_interrupt(void)
static void enter_polling_mode(void)
{
- uart_printf("[kbscan %s()]\n", __func__);
+ uart_puts("[KB poll]\n");
LM4_GPIO_IM(KB_SCAN_ROW_GPIO) = 0; /* 0: disable interrupt */
select_column(COLUMN_TRI_STATE_ALL);
}
@@ -210,7 +210,7 @@ static void print_raw_state(const char *msg)
{
int c;
- uart_printf("[%s:", msg);
+ uart_printf("[KB %s:", msg);
for (c = 0; c < KB_COLS; c++) {
if (raw_state[c])
uart_printf(" %02x", raw_state[c]);
@@ -279,7 +279,7 @@ static int check_keys_changed(void)
}
if (change)
- print_raw_state("KB raw state");
+ print_raw_state("raw state");
out:
/* Count number of key pressed */
@@ -370,7 +370,7 @@ void keyboard_scan_task(void)
{
int key_press_timer = 0;
- print_raw_state("KB init state");
+ print_raw_state("init state");
if (recovery_key_pressed)
uart_puts("[KB recovery key pressed at init!]\n");
diff --git a/chip/lm4/watchdog.c b/chip/lm4/watchdog.c
index ccc6e63b72..5a3080dcdb 100644
--- a/chip/lm4/watchdog.c
+++ b/chip/lm4/watchdog.c
@@ -141,6 +141,11 @@ int watchdog_init(int period_ms)
/* Low priority task to reload the watchdog */
void watchdog_task(void)
{
+ /* Print when the watchdog task starts. This is the lowest priority
+ * task, so this only starts once all other tasks have gotten a chance
+ * to do their task inits and have gone to sleep. */
+ uart_printf("[watchdog task started at %d us]\n", get_time().le.lo);
+
while (1) {
#ifdef BOARD_bds
gpio_set_level(GPIO_DEBUG_LED, 1);