14 #include <asm/current.h>
17 #include <linux/kernel.h>
20 #define crisv10_mask_irq(irq_nr) (*R_VECT_MASK_CLR = 1 << (irq_nr));
21 #define crisv10_unmask_irq(irq_nr) (*R_VECT_MASK_SET = 1 << (irq_nr));
45 unsigned short *jinstr = (
unsigned short *)&
etrax_irv->v[n*2];
46 unsigned long *jaddr = (
unsigned long *)(jinstr + 1);
51 *jaddr = (
unsigned long)addr;
80 void mmu_bus_fault(
void);
82 BUILD_IRQ(16, 0x10000 | 0x20000)
83 BUILD_IRQ(17, 0x20000 | 0x10000)
84 BUILD_IRQ(18, 0x40000)
85 BUILD_IRQ(19, 0x80000)
86 BUILD_IRQ(20, 0x100000)
87 BUILD_IRQ(21, 0x200000)
88 BUILD_IRQ(22, 0x400000)
89 BUILD_IRQ(23, 0x800000)
90 BUILD_IRQ(24, 0x1000000)
91 BUILD_IRQ(25, 0x2000000)
93 BUILD_IRQ(31, 0x80000000)
100 NULL,
NULL, IRQ2_interrupt, IRQ3_interrupt,
101 IRQ4_interrupt, IRQ5_interrupt, IRQ6_interrupt, IRQ7_interrupt,
102 IRQ8_interrupt, IRQ9_interrupt, IRQ10_interrupt, IRQ11_interrupt,
103 IRQ12_interrupt, IRQ13_interrupt,
NULL,
NULL,
104 IRQ16_interrupt, IRQ17_interrupt, IRQ18_interrupt, IRQ19_interrupt,
105 IRQ20_interrupt, IRQ21_interrupt, IRQ22_interrupt, IRQ23_interrupt,
120 static struct irq_chip crisv10_irq_type = {
122 .irq_shutdown = disable_crisv10_irq,
123 .irq_enable = enable_crisv10_irq,
124 .irq_disable = disable_crisv10_irq,
140 unsigned ethmask = 0;
143 mask = masked = *R_VECT_MASK_RD;
146 mask &= ~(
IO_MASK(R_VECT_MASK_RD, timer0));
155 ethmask = (
IO_MASK(R_VECT_MASK_RD, dma0) |
156 IO_MASK(R_VECT_MASK_RD, dma1));
160 *R_VECT_MASK_CLR = (mask | ethmask);
168 for (bit = 2; bit < 32; bit++) {
169 if (masked & (1 << bit)) {
178 *R_VECT_MASK_SET = (masked | ethmask);
192 #ifndef CONFIG_SVINTO_SIM
193 *R_IRQ_MASK0_CLR = 0xffffffff;
194 *R_IRQ_MASK1_CLR = 0xffffffff;
195 *R_IRQ_MASK2_CLR = 0xffffffff;
198 *R_VECT_MASK_CLR = 0xffffffff;
200 for (i = 0; i < 256; i++)
205 irq_set_chip_and_handler(i, &crisv10_irq_type,
215 for (i = 0; i < 16; i++)
240 #ifdef CONFIG_ETRAX_KGDB