X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=cpu%2Farm%2Fdrv%2Fsysirq_at91.c;h=33e6b0cd21fb56de666624566f3ba3acb0532d2a;hb=5e17751c7a0b5637ecc81de4e3189b9feca0de4b;hp=d943e89f09d44a724bea68fc8f3fd31d416bb0c7;hpb=09598a3a18d9a290d68a5bd9e39352b9f3aeab39;p=bertos.git diff --git a/cpu/arm/drv/sysirq_at91.c b/cpu/arm/drv/sysirq_at91.c index d943e89f..33e6b0cd 100644 --- a/cpu/arm/drv/sysirq_at91.c +++ b/cpu/arm/drv/sysirq_at91.c @@ -53,8 +53,9 @@ */ #include "sysirq_at91.h" -#include -#include +#include +#include +#include #include #include @@ -86,26 +87,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. @@ -164,7 +145,6 @@ void sysirq_init(void) */ void sysirq_setHandler(sysirq_t irq, sysirq_handler_t handler) { - ASSERT(irq >= 0); ASSERT(irq < SYSIRQ_CNT); sysirq_tab[irq].handler = handler; } @@ -174,7 +154,6 @@ void sysirq_setHandler(sysirq_t irq, sysirq_handler_t handler) */ void sysirq_setEnable(sysirq_t irq, bool enable) { - ASSERT(irq >= 0); ASSERT(irq < SYSIRQ_CNT); sysirq_tab[irq].setEnable(enable); @@ -186,7 +165,6 @@ void sysirq_setEnable(sysirq_t irq, bool enable) */ bool sysirq_enabled(sysirq_t irq) { - ASSERT(irq >= 0); ASSERT(irq < SYSIRQ_CNT); return sysirq_tab[irq].enabled;