summaryrefslogtreecommitdiff
path: root/chip/lm4/watchdog.c
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-04-03 16:22:11 +0000
committerVincent Palatin <vpalatin@chromium.org>2012-04-03 16:43:13 +0000
commit1652892d82f51c668c0f6e35206c727bd4049ca1 (patch)
tree890dfa625d9ebc73f40925ed78cf177074e83eef /chip/lm4/watchdog.c
parent0ece3ef0dcd795a716940f42e37e9c8ea5e5d5b1 (diff)
downloadchrome-ec-1652892d82f51c668c0f6e35206c727bd4049ca1.tar.gz
lm4f: fix watchdog trace
After commit 84a286b1, the watchdog handler was no longer properly connected to the interrupt vector. Also add a couple of flushes to get all the traces. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:8721 TEST=type "waitms 5000" in the EC console to trigger the watchdog and check we get the right serial trace. Change-Id: I5a4dcdbc9000e7caeb5361d196c1f737a477c353
Diffstat (limited to 'chip/lm4/watchdog.c')
-rw-r--r--chip/lm4/watchdog.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/chip/lm4/watchdog.c b/chip/lm4/watchdog.c
index 74fe3e5fbd..ca76da2c24 100644
--- a/chip/lm4/watchdog.c
+++ b/chip/lm4/watchdog.c
@@ -68,11 +68,13 @@ void watchdog_trace(uint32_t excep_lr, uint32_t excep_sp)
* situation.
*/
command_task_info(0, NULL);
+ uart_emergency_flush();
command_timer_info(0, NULL);
+ uart_emergency_flush();
}
-void irq_LM4_IRQ_WATCHDOG_handler(void) __attribute__((naked));
-void irq_LM4_IRQ_WATCHDOG_handler(void)
+void IRQ_HANDLER(LM4_IRQ_WATCHDOG)(void) __attribute__((naked));
+void IRQ_HANDLER(LM4_IRQ_WATCHDOG)(void)
{
asm volatile("mov r0, lr\n"
"mov r1, sp\n"
@@ -82,7 +84,7 @@ void irq_LM4_IRQ_WATCHDOG_handler(void)
"mov r0, lr\n"
"b task_resched_if_needed\n");
}
-const struct irq_priority prio_LM4_IRQ_WATCHDOG
+const struct irq_priority IRQ_BUILD_NAME(prio_, LM4_IRQ_WATCHDOG, )
__attribute__((section(".rodata.irqprio")))
= {LM4_IRQ_WATCHDOG, 0}; /* put the watchdog at the highest
priority */