diff options
author | Randall Spangler <rspangler@chromium.org> | 2011-12-12 14:03:49 -0800 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2011-12-12 14:23:04 -0800 |
commit | 1ce694189a847727e8eca53fbc324f67b92238e5 (patch) | |
tree | 44d08152e97fad7c73986ab3cdf3e87f5caaaa43 /chip/lm4/watchdog.c | |
parent | 70c3e30b633b530acb913a99d7cb602c9e8baf99 (diff) | |
download | chrome-ec-1ce694189a847727e8eca53fbc324f67b92238e5.tar.gz |
Add IRQ constants, and task functions to enable/disable/trigger IRQs.
The constants don't work with the DECLARE_IRQ() macro yet, because it
relies on stringizing the IRQ number.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=none
Change-Id: Ie6ddecd79e28c319b095089131579ba994a17da3
(cherry picked from commit e24904644a977f2618f51629cc066b93a3d53595)
Diffstat (limited to 'chip/lm4/watchdog.c')
-rw-r--r-- | chip/lm4/watchdog.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chip/lm4/watchdog.c b/chip/lm4/watchdog.c index d42716abf5..42a8c8961d 100644 --- a/chip/lm4/watchdog.c +++ b/chip/lm4/watchdog.c @@ -46,7 +46,7 @@ void watchdog_trace(uint32_t excep_lr, uint32_t excep_sp) * instead de-activate the interrupt in the NVIC : * so, we will get the trace only once */ - LM4_NVIC_DIS(0) = 1 << 18; + task_disable_irq(LM4_IRQ_WATCHDOG); asm("mrs %0, psp":"=r"(psp)); if ((excep_lr & 0xf) == 1) { @@ -81,7 +81,8 @@ void irq_18_handler(void) "b task_resched_if_needed\n"); } const struct irq_priority prio_18 __attribute__((section(".rodata.irqprio"))) - = {18, 0}; /* put the watchdog at the highest priority */ + = {LM4_IRQ_WATCHDOG, 0}; /* put the watchdog at the highest + priority */ void watchdog_reload(void) { |