aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-nomadik/gpio.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@stericsson.com>2010-05-06 05:40:47 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-05-06 15:15:23 -0400
commit6b07aaedc029d507501a931aabfd3d0a70f1828f (patch)
tree74c0e52ce716550ac582b7270bfd8e0cf7f9dff4 /arch/arm/plat-nomadik/gpio.c
parent591d8dd71cc265465ac706ac11e5f613c6181a43 (diff)
ARM: 6099/1: nomadik-gpio: fix mask/unmask
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>
Diffstat (limited to 'arch/arm/plat-nomadik/gpio.c')
-rw-r--r--arch/arm/plat-nomadik/gpio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c
index 092f380063b3..38fc3b5d9872 100644
--- a/arch/arm/plat-nomadik/gpio.c
+++ b/arch/arm/plat-nomadik/gpio.c
@@ -123,14 +123,14 @@ static void nmk_gpio_irq_mask(unsigned int irq)
123 /* we must individually clear the two edges */ 123 /* we must individually clear the two edges */
124 spin_lock_irqsave(&nmk_chip->lock, flags); 124 spin_lock_irqsave(&nmk_chip->lock, flags);
125 if (nmk_chip->edge_rising & bitmask) { 125 if (nmk_chip->edge_rising & bitmask) {
126 reg = readl(nmk_chip->addr + NMK_GPIO_RWIMSC); 126 reg = readl(nmk_chip->addr + NMK_GPIO_RIMSC);
127 reg &= ~bitmask; 127 reg &= ~bitmask;
128 writel(reg, nmk_chip->addr + NMK_GPIO_RWIMSC); 128 writel(reg, nmk_chip->addr + NMK_GPIO_RIMSC);
129 } 129 }
130 if (nmk_chip->edge_falling & bitmask) { 130 if (nmk_chip->edge_falling & bitmask) {
131 reg = readl(nmk_chip->addr + NMK_GPIO_FWIMSC); 131 reg = readl(nmk_chip->addr + NMK_GPIO_FIMSC);
132 reg &= ~bitmask; 132 reg &= ~bitmask;
133 writel(reg, nmk_chip->addr + NMK_GPIO_FWIMSC); 133 writel(reg, nmk_chip->addr + NMK_GPIO_FIMSC);
134 } 134 }
135 spin_unlock_irqrestore(&nmk_chip->lock, flags); 135 spin_unlock_irqrestore(&nmk_chip->lock, flags);
136}; 136};
@@ -151,14 +151,14 @@ static void nmk_gpio_irq_unmask(unsigned int irq)
151 /* we must individually set the two edges */ 151 /* we must individually set the two edges */
152 spin_lock_irqsave(&nmk_chip->lock, flags); 152 spin_lock_irqsave(&nmk_chip->lock, flags);
153 if (nmk_chip->edge_rising & bitmask) { 153 if (nmk_chip->edge_rising & bitmask) {
154 reg = readl(nmk_chip->addr + NMK_GPIO_RWIMSC); 154 reg = readl(nmk_chip->addr + NMK_GPIO_RIMSC);
155 reg |= bitmask; 155 reg |= bitmask;
156 writel(reg, nmk_chip->addr + NMK_GPIO_RWIMSC); 156 writel(reg, nmk_chip->addr + NMK_GPIO_RIMSC);
157 } 157 }
158 if (nmk_chip->edge_falling & bitmask) { 158 if (nmk_chip->edge_falling & bitmask) {
159 reg = readl(nmk_chip->addr + NMK_GPIO_FWIMSC); 159 reg = readl(nmk_chip->addr + NMK_GPIO_FIMSC);
160 reg |= bitmask; 160 reg |= bitmask;
161 writel(reg, nmk_chip->addr + NMK_GPIO_FWIMSC); 161 writel(reg, nmk_chip->addr + NMK_GPIO_FIMSC);
162 } 162 }
163 spin_unlock_irqrestore(&nmk_chip->lock, flags); 163 spin_unlock_irqrestore(&nmk_chip->lock, flags);
164} 164}