diff options
Diffstat (limited to 'arch/mn10300/unit-asb2364/irq-fpga.c')
-rw-r--r-- | arch/mn10300/unit-asb2364/irq-fpga.c | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/arch/mn10300/unit-asb2364/irq-fpga.c b/arch/mn10300/unit-asb2364/irq-fpga.c index fcf29754e4d1..e16c216f31dc 100644 --- a/arch/mn10300/unit-asb2364/irq-fpga.c +++ b/arch/mn10300/unit-asb2364/irq-fpga.c | |||
@@ -17,38 +17,38 @@ | |||
17 | /* | 17 | /* |
18 | * FPGA PIC operations | 18 | * FPGA PIC operations |
19 | */ | 19 | */ |
20 | static void asb2364_fpga_mask(unsigned int irq) | 20 | static void asb2364_fpga_mask(struct irq_data *d) |
21 | { | 21 | { |
22 | ASB2364_FPGA_REG_MASK(irq - NR_CPU_IRQS) = 0x0001; | 22 | ASB2364_FPGA_REG_MASK(d->irq - NR_CPU_IRQS) = 0x0001; |
23 | SyncExBus(); | 23 | SyncExBus(); |
24 | } | 24 | } |
25 | 25 | ||
26 | static void asb2364_fpga_ack(unsigned int irq) | 26 | static void asb2364_fpga_ack(struct irq_data *d) |
27 | { | 27 | { |
28 | ASB2364_FPGA_REG_IRQ(irq - NR_CPU_IRQS) = 0x0001; | 28 | ASB2364_FPGA_REG_IRQ(d->irq - NR_CPU_IRQS) = 0x0001; |
29 | SyncExBus(); | 29 | SyncExBus(); |
30 | } | 30 | } |
31 | 31 | ||
32 | static void asb2364_fpga_mask_ack(unsigned int irq) | 32 | static void asb2364_fpga_mask_ack(struct irq_data *d) |
33 | { | 33 | { |
34 | ASB2364_FPGA_REG_MASK(irq - NR_CPU_IRQS) = 0x0001; | 34 | ASB2364_FPGA_REG_MASK(d->irq - NR_CPU_IRQS) = 0x0001; |
35 | SyncExBus(); | 35 | SyncExBus(); |
36 | ASB2364_FPGA_REG_IRQ(irq - NR_CPU_IRQS) = 0x0001; | 36 | ASB2364_FPGA_REG_IRQ(d->irq - NR_CPU_IRQS) = 0x0001; |
37 | SyncExBus(); | 37 | SyncExBus(); |
38 | } | 38 | } |
39 | 39 | ||
40 | static void asb2364_fpga_unmask(unsigned int irq) | 40 | static void asb2364_fpga_unmask(struct irq_data *d) |
41 | { | 41 | { |
42 | ASB2364_FPGA_REG_MASK(irq - NR_CPU_IRQS) = 0x0000; | 42 | ASB2364_FPGA_REG_MASK(d->irq - NR_CPU_IRQS) = 0x0000; |
43 | SyncExBus(); | 43 | SyncExBus(); |
44 | } | 44 | } |
45 | 45 | ||
46 | static struct irq_chip asb2364_fpga_pic = { | 46 | static struct irq_chip asb2364_fpga_pic = { |
47 | .name = "fpga", | 47 | .name = "fpga", |
48 | .ack = asb2364_fpga_ack, | 48 | .irq_ack = asb2364_fpga_ack, |
49 | .mask = asb2364_fpga_mask, | 49 | .irq_mask = asb2364_fpga_mask, |
50 | .mask_ack = asb2364_fpga_mask_ack, | 50 | .irq_mask_ack = asb2364_fpga_mask_ack, |
51 | .unmask = asb2364_fpga_unmask, | 51 | .irq_unmask = asb2364_fpga_unmask, |
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* | 54 | /* |
@@ -88,8 +88,20 @@ void __init irq_fpga_init(void) | |||
88 | { | 88 | { |
89 | int irq; | 89 | int irq; |
90 | 90 | ||
91 | ASB2364_FPGA_REG_MASK_LAN = 0x0001; | ||
92 | SyncExBus(); | ||
93 | ASB2364_FPGA_REG_MASK_UART = 0x0001; | ||
94 | SyncExBus(); | ||
95 | ASB2364_FPGA_REG_MASK_I2C = 0x0001; | ||
96 | SyncExBus(); | ||
97 | ASB2364_FPGA_REG_MASK_USB = 0x0001; | ||
98 | SyncExBus(); | ||
99 | ASB2364_FPGA_REG_MASK_FPGA = 0x0001; | ||
100 | SyncExBus(); | ||
101 | |||
91 | for (irq = NR_CPU_IRQS; irq < NR_IRQS; irq++) | 102 | for (irq = NR_CPU_IRQS; irq < NR_IRQS; irq++) |
92 | set_irq_chip_and_handler(irq, &asb2364_fpga_pic, handle_level_irq); | 103 | irq_set_chip_and_handler(irq, &asb2364_fpga_pic, |
104 | handle_level_irq); | ||
93 | 105 | ||
94 | /* the FPGA drives the XIRQ1 input on the CPU PIC */ | 106 | /* the FPGA drives the XIRQ1 input on the CPU PIC */ |
95 | setup_irq(XIRQ1, &fpga_irq[0]); | 107 | setup_irq(XIRQ1, &fpga_irq[0]); |