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 *)(ADDR))
29 #define __get_IMR() ({ __reg16(0xffc00004); })
30 #define __set_IMR(M) do { __reg16(0xffc00004) = (M); wmb(); } while(0)
31 #define __get_IFR() ({ __reg16(0xffc0000c); })
32 #define __clr_IFR(M) do { __reg16(0xffc0000c) = ~(M); wmb(); } while(0)
38 static void frv_fpga_mask(
struct irq_data *
d)
47 static void frv_fpga_ack(
struct irq_data *
d)
52 static void frv_fpga_mask_ack(
struct irq_data *d)
62 static void frv_fpga_unmask(
struct irq_data *d)
71 static struct irq_chip frv_fpga_pic = {
73 .irq_ack = frv_fpga_ack,
74 .irq_mask = frv_fpga_mask,
75 .irq_mask_ack = frv_fpga_mask_ack,
76 .irq_unmask = frv_fpga_unmask,
82 static irqreturn_t fpga_interrupt(
int irq,
void *_mask)
93 asm(
"scan %1,gr0,%0" :
"=r"(irq) :
"r"(mask));
109 .handler = fpga_interrupt,
112 .dev_id = (
void *) 0x0028UL,
115 .handler = fpga_interrupt,
118 .dev_id = (
void *) 0x0050UL,
121 .handler = fpga_interrupt,
124 .dev_id = (
void *) 0x1c00UL,
127 .handler = fpga_interrupt,
130 .dev_id = (
void *) 0x6386UL,