ARM: 6099/1: nomadik-gpio: fix mask/unmask
authorRabin Vincent <rabin.vincent@stericsson.com>
Thu, 6 May 2010 09:40:47 +0000 (10:40 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 6 May 2010 19:15:23 +0000 (20:15 +0100)
Mask/unmask should modify the interrupt mask register (RIMSC
and FIMSC) not the wakeup mask registers (RWIMSC and FWIMSC).

Acked-by: Alessandro Rubini <rubini@unipv.it>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/plat-nomadik/gpio.c

index 092f380..38fc3b5 100644 (file)
@@ -123,14 +123,14 @@ static void nmk_gpio_irq_mask(unsigned int irq)
        /* we must individually clear the two edges */
        spin_lock_irqsave(&nmk_chip->lock, flags);
        if (nmk_chip->edge_rising & bitmask) {
-               reg = readl(nmk_chip->addr + NMK_GPIO_RWIMSC);
+               reg = readl(nmk_chip->addr + NMK_GPIO_RIMSC);
                reg &= ~bitmask;
-               writel(reg, nmk_chip->addr + NMK_GPIO_RWIMSC);
+               writel(reg, nmk_chip->addr + NMK_GPIO_RIMSC);
        }
        if (nmk_chip->edge_falling & bitmask) {
-               reg = readl(nmk_chip->addr + NMK_GPIO_FWIMSC);
+               reg = readl(nmk_chip->addr + NMK_GPIO_FIMSC);
                reg &= ~bitmask;
-               writel(reg, nmk_chip->addr + NMK_GPIO_FWIMSC);
+               writel(reg, nmk_chip->addr + NMK_GPIO_FIMSC);
        }
        spin_unlock_irqrestore(&nmk_chip->lock, flags);
 };
@@ -151,14 +151,14 @@ static void nmk_gpio_irq_unmask(unsigned int irq)
        /* we must individually set the two edges */
        spin_lock_irqsave(&nmk_chip->lock, flags);
        if (nmk_chip->edge_rising & bitmask) {
-               reg = readl(nmk_chip->addr + NMK_GPIO_RWIMSC);
+               reg = readl(nmk_chip->addr + NMK_GPIO_RIMSC);
                reg |= bitmask;
-               writel(reg, nmk_chip->addr + NMK_GPIO_RWIMSC);
+               writel(reg, nmk_chip->addr + NMK_GPIO_RIMSC);
        }
        if (nmk_chip->edge_falling & bitmask) {
-               reg = readl(nmk_chip->addr + NMK_GPIO_FWIMSC);
+               reg = readl(nmk_chip->addr + NMK_GPIO_FIMSC);
                reg |= bitmask;
-               writel(reg, nmk_chip->addr + NMK_GPIO_FWIMSC);
+               writel(reg, nmk_chip->addr + NMK_GPIO_FIMSC);
        }
        spin_unlock_irqrestore(&nmk_chip->lock, flags);
 }