12 #include <linux/ptrace.h>
13 #include <linux/errno.h>
14 #include <linux/signal.h>
15 #include <linux/sched.h>
20 #include <linux/bitops.h>
23 #include <asm/delay.h>
27 #define __reg16(ADDR) (*(volatile unsigned short *)(__region_CS2 + (ADDR)))
29 #define __get_IMR() ({ __reg16(0x0a); })
30 #define __set_IMR(M) do { __reg16(0x0a) = (M); wmb(); } while(0)
31 #define __get_IFR() ({ __reg16(0x02); })
32 #define __clr_IFR(M) do { __reg16(0x02) = ~(M); wmb(); } while(0)
37 static void frv_fpga_mask(
struct irq_data *
d)
45 static void frv_fpga_ack(
struct irq_data *
d)
50 static void frv_fpga_mask_ack(
struct irq_data *d)
60 static void frv_fpga_unmask(
struct irq_data *d)
69 static struct irq_chip frv_fpga_pic = {
71 .irq_ack = frv_fpga_ack,
72 .irq_mask = frv_fpga_mask,
73 .irq_mask_ack = frv_fpga_mask_ack,
74 .irq_unmask = frv_fpga_unmask,
80 static irqreturn_t fpga_interrupt(
int irq,
void *_mask)
91 asm(
"scan %1,gr0,%0" :
"=r"(irq) :
"r"(mask));
107 .handler = fpga_interrupt,
110 .dev_id = (
void *) 0x0700UL,