Create a unique include file for ARM I/O registers.
[bertos.git] / cpu / arm / drv / sysirq_at91.c
index a942c0957dd964adaaf7da75a7e5f30f35834cab..e95d5a15dc49af4d01ab8b5a2ead2c0ac871f429 100644 (file)
@@ -52,9 +52,9 @@
  * \see sysirq_setEnable
  */
 
-#include "sysirq.h"
-#include "at91sam7s.h"
-#include <cfg/cpu.h>
+#include "sysirq_at91.h"
+#include <io/arm.h>
+#include <cpu/cpu.h>
 #include <cfg/module.h>
 #include <cfg/macros.h>
 
@@ -86,26 +86,6 @@ static SysIrq sysirq_tab[] =
 
 STATIC_ASSERT(countof(sysirq_tab) == SYSIRQ_CNT);
 
-/*!
- * \brief Interrupt entry.
- */
-#define IRQ_ENTRY() \
-    asm volatile("sub   lr, lr,#4"          "\n\t"  /* Adjust LR */ \
-                 "stmfd sp!,{r0-r12,lr}"    "\n\t"  /* Save registers on IRQ stack. */ \
-                 "mrs   r1, spsr"           "\n\t"  /* Save SPSR */ \
-                 "stmfd sp!,{r1}"           "\n\t")     /* */
-
-/*!
- * \brief Interrupt exit.
- */
-#define IRQ_EXIT() \
-    asm volatile("ldmfd sp!, {r1}"          "\n\t"  /* Restore SPSR */ \
-                 "msr   spsr_c, r1"         "\n\t"  /* */ \
-                 "ldr   r0, =0xFFFFF000"    "\n\t"  /* End of interrupt. */ \
-                 "str   r0, [r0, #0x130]"   "\n\t"  /* */ \
-                 "ldmfd sp!, {r0-r12, pc}^" "\n\t")     /* Restore registers and return. */
-
-
 /**
  * System IRQ dispatcher.
  * This is the entry point for all system IRQs in AT91.