]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/alpha/kernel/sys_jensen.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / arch / alpha / kernel / sys_jensen.c
index 7a7ae36fff913d22448687188c4c56536f2b96ae..00341b75c8b25d81b0e203c8771b40bb1cfa6f14 100644 (file)
  * world.
  */
 
-static unsigned int
-jensen_local_startup(unsigned int irq)
-{
-       /* the parport is really hw IRQ 1, silly Jensen.  */
-       if (irq == 7)
-               i8259a_startup_irq(1);
-       else
-               /*
-                * For all true local interrupts, set the flag that prevents
-                * the IPL from being dropped during handler processing.
-                */
-               if (irq_desc[irq].action)
-                       irq_desc[irq].action->flags |= IRQF_DISABLED;
-       return 0;
-}
-
-static void
-jensen_local_shutdown(unsigned int irq)
-{
-       /* the parport is really hw IRQ 1, silly Jensen.  */
-       if (irq == 7)
-               i8259a_disable_irq(1);
-}
-
-static void
-jensen_local_enable(unsigned int irq)
-{
-       /* the parport is really hw IRQ 1, silly Jensen.  */
-       if (irq == 7)
-               i8259a_enable_irq(1);
-}
-
 static void
-jensen_local_disable(unsigned int irq)
+jensen_local_enable(struct irq_data *d)
 {
        /* the parport is really hw IRQ 1, silly Jensen.  */
-       if (irq == 7)
-               i8259a_disable_irq(1);
+       if (d->irq == 7)
+               i8259a_enable_irq(d);
 }
 
 static void
-jensen_local_ack(unsigned int irq)
+jensen_local_disable(struct irq_data *d)
 {
        /* the parport is really hw IRQ 1, silly Jensen.  */
-       if (irq == 7)
-               i8259a_mask_and_ack_irq(1);
+       if (d->irq == 7)
+               i8259a_disable_irq(d);
 }
 
 static void
-jensen_local_end(unsigned int irq)
+jensen_local_mask_ack(struct irq_data *d)
 {
        /* the parport is really hw IRQ 1, silly Jensen.  */
-       if (irq == 7)
-               i8259a_end_irq(1);
+       if (d->irq == 7)
+               i8259a_mask_and_ack_irq(d);
 }
 
 static struct irq_chip jensen_local_irq_type = {
        .name           = "LOCAL",
-       .startup        = jensen_local_startup,
-       .shutdown       = jensen_local_shutdown,
-       .enable         = jensen_local_enable,
-       .disable        = jensen_local_disable,
-       .ack            = jensen_local_ack,
-       .end            = jensen_local_end,
+       .irq_unmask     = jensen_local_enable,
+       .irq_mask       = jensen_local_disable,
+       .irq_mask_ack   = jensen_local_mask_ack,
 };
 
 static void 
@@ -158,7 +123,7 @@ jensen_device_interrupt(unsigned long vector)
        }
 
        /* If there is no handler yet... */
-       if (irq_desc[irq].action == NULL) {
+       if (!irq_has_action(irq)) {
            /* If it is a local interrupt that cannot be masked... */
            if (vector >= 0x900)
            {
@@ -206,11 +171,11 @@ jensen_init_irq(void)
 {
        init_i8259a_irqs();
 
-       irq_desc[1].chip = &jensen_local_irq_type;
-       irq_desc[4].chip = &jensen_local_irq_type;
-       irq_desc[3].chip = &jensen_local_irq_type;
-       irq_desc[7].chip = &jensen_local_irq_type;
-       irq_desc[9].chip = &jensen_local_irq_type;
+       set_irq_chip_and_handler(1, &jensen_local_irq_type, handle_level_irq);
+       set_irq_chip_and_handler(4, &jensen_local_irq_type, handle_level_irq);
+       set_irq_chip_and_handler(3, &jensen_local_irq_type, handle_level_irq);
+       set_irq_chip_and_handler(7, &jensen_local_irq_type, handle_level_irq);
+       set_irq_chip_and_handler(9, &jensen_local_irq_type, handle_level_irq);
 
        common_init_isa_dma();
 }