summaryrefslogtreecommitdiff
path: root/firmware/src/os/wdt.c
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-10-01 21:45:43 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-10-01 21:45:43 +0000
commitbfff30bfec74c508e3f8904f8732799f30e6829d (patch)
treec104e38c808859adf0c7edcfd76873ce07b75f3b /firmware/src/os/wdt.c
parent2b55faec5a6e3a4d2130ad341f01cd55116b64c3 (diff)
- add proper system interrupt (shared) demultiplexing code
- port debug unit, watchdog timer, periodic interval timer to system_irq.c git-svn-id: https://svn.openpcd.org:2342/trunk@252 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'firmware/src/os/wdt.c')
-rw-r--r--firmware/src/os/wdt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/src/os/wdt.c b/firmware/src/os/wdt.c
index 5a3c809..55a0e70 100644
--- a/firmware/src/os/wdt.c
+++ b/firmware/src/os/wdt.c
@@ -21,10 +21,11 @@
#include <AT91SAM7.h>
#include <os/dbgu.h>
+#include <os/system_irq.h>
#define WDT_DEBUG
-static void wdt_irq(void)
+static void wdt_irq(u_int32_t sr)
{
DEBUGPCRF("================> WATCHDOG EXPIRED !!!!!");
}
@@ -36,6 +37,7 @@ void wdt_restart(void)
void wdt_init(void)
{
+ sysirq_register(AT91SAM7_SYSIRQ_WDT, &wdt_irq);
#ifdef WDT_DEBUG
AT91F_WDTSetMode(AT91C_BASE_WDTC, (0xfff << 16) |
AT91C_WDTC_WDDBGHLT | AT91C_WDTC_WDIDLEHLT |
personal git repositories of Harald Welte. Your mileage may vary