Skip to content

Commit

Permalink
CRIS v32: Update asm-cris/arch-v32/irq.h for ETRAX FS and ARTPEC-3
Browse files Browse the repository at this point in the history
- Correct include to use <>
- Rework calculation of number of IRQs and exceptions we have.
- Remove useless "mask" argument to BUILD_IRQ macro
  • Loading branch information
Jesper Nilsson committed Feb 8, 2008
1 parent 0c2efc4 commit 1e5915b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions include/asm-cris/arch-v32/irq.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
#ifndef _ASM_ARCH_IRQ_H
#define _ASM_ARCH_IRQ_H

#include "hwregs/intr_vect.h"
#include <hwregs/intr_vect.h>

/* Number of non-cpu interrupts. */
#define NR_IRQS 0x50 /* Exceptions + IRQs */
#define NR_REAL_IRQS 0x20 /* IRQs */
#define NR_IRQS NBR_INTR_VECT /* Exceptions + IRQs */
#define FIRST_IRQ 0x31 /* Exception number for first IRQ */
#define NR_REAL_IRQS (NBR_INTR_VECT - FIRST_IRQ) /* IRQs */
#if NR_REAL_IRQS > 32
#define MACH_IRQS 64
#else
#define MACH_IRQS 32
#endif

#ifndef __ASSEMBLY__
/* Global IRQ vector. */
Expand Down Expand Up @@ -73,15 +78,15 @@ void set_exception_vector(int n, irqvectptr addr);
* which will acknowledge the interrupt, is run. The actual blocking is made
* by crisv32_do_IRQ.
*/
#define BUILD_IRQ(nr, mask) \
#define BUILD_IRQ(nr) \
void IRQ_NAME(nr); \
__asm__ ( \
".text\n\t" \
"IRQ" #nr "_interrupt:\n\t" \
SAVE_ALL \
KGDB_FIXUP \
"move.d "#nr",$r10\n\t" \
"move.d $sp,$r12\n\t" \
"move.d $sp, $r12\n\t" \
"jsr crisv32_do_IRQ\n\t" \
"moveq 1, $r11\n\t" \
"jump ret_from_intr\n\t" \
Expand Down

0 comments on commit 1e5915b

Please sign in to comment.