]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/mn10300/unit-asb2364/irq-fpga.c
Merge branch 'x86/ld-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[karo-tx-linux.git] / arch / mn10300 / unit-asb2364 / irq-fpga.c
index fcf29754e4d1770b4f1d1867ccad8d4e4325b1a2..e16c216f31dcdd3ce0c4279f6e921ce13db1f41e 100644 (file)
 /*
  * FPGA PIC operations
  */
-static void asb2364_fpga_mask(unsigned int irq)
+static void asb2364_fpga_mask(struct irq_data *d)
 {
-       ASB2364_FPGA_REG_MASK(irq - NR_CPU_IRQS) = 0x0001;
+       ASB2364_FPGA_REG_MASK(d->irq - NR_CPU_IRQS) = 0x0001;
        SyncExBus();
 }
 
-static void asb2364_fpga_ack(unsigned int irq)
+static void asb2364_fpga_ack(struct irq_data *d)
 {
-       ASB2364_FPGA_REG_IRQ(irq - NR_CPU_IRQS) = 0x0001;
+       ASB2364_FPGA_REG_IRQ(d->irq - NR_CPU_IRQS) = 0x0001;
        SyncExBus();
 }
 
-static void asb2364_fpga_mask_ack(unsigned int irq)
+static void asb2364_fpga_mask_ack(struct irq_data *d)
 {
-       ASB2364_FPGA_REG_MASK(irq - NR_CPU_IRQS) = 0x0001;
+       ASB2364_FPGA_REG_MASK(d->irq - NR_CPU_IRQS) = 0x0001;
        SyncExBus();
-       ASB2364_FPGA_REG_IRQ(irq - NR_CPU_IRQS) = 0x0001;
+       ASB2364_FPGA_REG_IRQ(d->irq - NR_CPU_IRQS) = 0x0001;
        SyncExBus();
 }
 
-static void asb2364_fpga_unmask(unsigned int irq)
+static void asb2364_fpga_unmask(struct irq_data *d)
 {
-       ASB2364_FPGA_REG_MASK(irq - NR_CPU_IRQS) = 0x0000;
+       ASB2364_FPGA_REG_MASK(d->irq - NR_CPU_IRQS) = 0x0000;
        SyncExBus();
 }
 
 static struct irq_chip asb2364_fpga_pic = {
        .name           = "fpga",
-       .ack            = asb2364_fpga_ack,
-       .mask           = asb2364_fpga_mask,
-       .mask_ack       = asb2364_fpga_mask_ack,
-       .unmask         = asb2364_fpga_unmask,
+       .irq_ack        = asb2364_fpga_ack,
+       .irq_mask       = asb2364_fpga_mask,
+       .irq_mask_ack   = asb2364_fpga_mask_ack,
+       .irq_unmask     = asb2364_fpga_unmask,
 };
 
 /*
@@ -88,8 +88,20 @@ void __init irq_fpga_init(void)
 {
        int irq;
 
+       ASB2364_FPGA_REG_MASK_LAN  = 0x0001;
+       SyncExBus();
+       ASB2364_FPGA_REG_MASK_UART = 0x0001;
+       SyncExBus();
+       ASB2364_FPGA_REG_MASK_I2C  = 0x0001;
+       SyncExBus();
+       ASB2364_FPGA_REG_MASK_USB  = 0x0001;
+       SyncExBus();
+       ASB2364_FPGA_REG_MASK_FPGA = 0x0001;
+       SyncExBus();
+
        for (irq = NR_CPU_IRQS; irq < NR_IRQS; irq++)
-               set_irq_chip_and_handler(irq, &asb2364_fpga_pic, handle_level_irq);
+               irq_set_chip_and_handler(irq, &asb2364_fpga_pic,
+                                        handle_level_irq);
 
        /* the FPGA drives the XIRQ1 input on the CPU PIC */
        setup_irq(XIRQ1, &fpga_irq[0]);