aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2011-01-10 17:53:12 -0500
committerEric Miao <eric.y.miao@gmail.com>2011-01-14 11:21:06 -0500
commit1b624fb64c2de44c00576cc9695680983f05c1ce (patch)
treeb384179be6bf0aa637b4fb0d496affbb4ead89bd /arch/arm/mach-pxa
parent57879b8c40d4c254f1feba3adbeb69614fe5e4c9 (diff)
ARM: pxa: fix suspend/resume array index miscalculation
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/irq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 8f947002c0bf..b71677bce548 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -156,7 +156,7 @@ static inline void __iomem *irq_base(int i)
156 0x40d00130, 156 0x40d00130,
157 }; 157 };
158 158
159 return (void __iomem *)io_p2v(phys_base[i >> 5]); 159 return (void __iomem *)io_p2v(phys_base[i]);
160} 160}
161 161
162void __init pxa_init_irq(int irq_nr, set_wake_t fn) 162void __init pxa_init_irq(int irq_nr, set_wake_t fn)
@@ -168,7 +168,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
168 pxa_internal_irq_nr = irq_nr; 168 pxa_internal_irq_nr = irq_nr;
169 169
170 for (n = 0; n < irq_nr; n += 32) { 170 for (n = 0; n < irq_nr; n += 32) {
171 void __iomem *base = irq_base(n); 171 void __iomem *base = irq_base(n >> 5);
172 172
173 __raw_writel(0, base + ICMR); /* disable all IRQs */ 173 __raw_writel(0, base + ICMR); /* disable all IRQs */
174 __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */ 174 __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */
@@ -200,7 +200,7 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
200{ 200{
201 int i; 201 int i;
202 202
203 for (i = 0; i < pxa_internal_irq_nr; i += 32) { 203 for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
204 void __iomem *base = irq_base(i); 204 void __iomem *base = irq_base(i);
205 205
206 saved_icmr[i] = __raw_readl(base + ICMR); 206 saved_icmr[i] = __raw_readl(base + ICMR);
@@ -219,7 +219,7 @@ static int pxa_irq_resume(struct sys_device *dev)
219{ 219{
220 int i; 220 int i;
221 221
222 for (i = 0; i < pxa_internal_irq_nr; i += 32) { 222 for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
223 void __iomem *base = irq_base(i); 223 void __iomem *base = irq_base(i);
224 224
225 __raw_writel(saved_icmr[i], base + ICMR); 225 __raw_writel(saved_icmr[i], base + ICMR);