summaryrefslogtreecommitdiff
path: root/firmware/src/os/dbgu.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/dbgu.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/dbgu.c')
-rw-r--r--firmware/src/os/dbgu.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/firmware/src/os/dbgu.c b/firmware/src/os/dbgu.c
index 458aa4e..a3a5941 100644
--- a/firmware/src/os/dbgu.c
+++ b/firmware/src/os/dbgu.c
@@ -40,6 +40,7 @@
#include "../openpcd.h"
#include <os/led.h>
#include <os/main.h>
+#include <os/system_irq.h>
#include <asm/system.h>
#include <compile.h>
@@ -72,10 +73,10 @@ static void Send_reset(void)
//*----------------------------------------------------------------------------
//* Function Name : DBGU_irq_handler
-//* Object : C handler interrupt function called by the interrupts
-//* assembling routine
+//* Object : C handler interrupt function called by the sysirq
+//* demultiplexer
//*----------------------------------------------------------------------------
-static void DBGU_irq_handler(void)
+static void DBGU_irq_handler(u_int32_t sr)
{
static char value;
@@ -140,10 +141,7 @@ void AT91F_DBGU_Init(void)
AT91F_US_EnableIt((AT91PS_USART) AT91C_BASE_DBGU, AT91C_US_RXRDY);
//* open interrupt
- AT91F_AIC_ConfigureIt(AT91C_BASE_AIC, AT91C_ID_SYS, USART_SYS_LEVEL,
- AT91C_AIC_SRCTYPE_INT_HIGH_LEVEL,
- DBGU_irq_handler);
- AT91F_AIC_EnableIt(AT91C_BASE_AIC, AT91C_ID_SYS);
+ sysirq_register(AT91SAM7_SYSIRQ_DBGU, &DBGU_irq_handler);
AT91F_DBGU_Printk("\n\r");
AT91F_DBGU_Printk("(C) 2006 by Harald Welte <hwelte@hmw-consulting.de>\n\r"
personal git repositories of Harald Welte. Your mileage may vary