]> git.hungrycats.org Git - linux/commitdiff
[ARM] Make IRQ probing more reliable; ensure that IRQ edge detection
authorRussell King <rmk@flint.arm.linux.org.uk>
Tue, 9 Jul 2002 22:29:39 +0000 (23:29 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Tue, 9 Jul 2002 22:29:39 +0000 (23:29 +0100)
is set correctly.  Remove couple of debugging printk()s.

arch/arm/kernel/irq.c
arch/arm/mach-sa1100/irq.c
arch/arm/mach-sa1100/sa1111.c

index 78805deb3b3b7c7cc0324d2d9908b3c6c1b46cf4..c99e1ecd8b40bb21e5fdc76c718286cd1c689090 100644 (file)
@@ -633,6 +633,8 @@ unsigned long probe_irq_on(void)
 
                irq_desc[i].probing = 1;
                irq_desc[i].triggered = 0;
+               if (irq_desc[i].chip->type)
+                       irq_desc[i].chip->type(i, IRQT_PROBE);
                irq_desc[i].chip->unmask(i);
                irqs += 1;
        }
index 7aeba17e06a269ee33539e1c59f0b1de570ad473..9c442c5d43ec1167ff3c0d1e9b90f1870802e995 100644 (file)
@@ -55,6 +55,12 @@ static int sa1100_gpio_type(unsigned int irq, unsigned int type)
        else
                mask = GPIO11_27_MASK(irq);
 
+       if (type == IRQT_PROBE) {
+               if ((GPIO_IRQ_rising_edge | GPIO_IRQ_falling_edge) & mask)
+                       return 0;
+               type == __IRQT_RISEDGE | __IRQT_FALEDGE;
+       }
+
        if (type & __IRQT_RISEDGE) {
                GPIO_IRQ_rising_edge |= mask;
        } else
index 5b07984643bc2be92408ef66ed22d86d5def8050..f63104bcf5b57ef33154b00af7040645d4559d83 100644 (file)
@@ -117,11 +117,12 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags)
 {
        unsigned int mask = SA1111_IRQMASK_LO(irq);
 
+       if (flags == IRQT_PROBE)
+               return 0;
+
        if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0)
                return -EINVAL;
 
-       printk("IRQ%d: %s edge\n", irq, flags & __IRQT_RISEDGE ? "rising" : "falling");
-
        if (flags & __IRQT_RISEDGE)
                INTPOL0 &= ~mask;
        else
@@ -181,11 +182,12 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags)
 {
        unsigned int mask = SA1111_IRQMASK_HI(irq);
 
+       if (flags == IRQT_PROBE)
+               return 0;
+
        if ((!(flags & __IRQT_RISEDGE) ^ !(flags & __IRQT_FALEDGE)) == 0)
                return -EINVAL;
 
-       printk("IRQ%d: %s edge\n", irq, flags & __IRQT_RISEDGE ? "rising" : "falling");
-
        if (flags & __IRQT_RISEDGE)
                INTPOL1 &= ~mask;
        else