summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/irq.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2010-01-11 20:39:37 +0800
committerEric Miao <eric.y.miao@gmail.com>2010-01-13 21:01:09 +0800
commitc70f5a60994058895384f593989a9fbe6fe6adee (patch)
tree57e9b11fdc73b3e0178d6dbe56c738aab1aa763f /arch/arm/mach-pxa/irq.c
parent463de2096d8040af2f79f8c4f6a61c965a5109f0 (diff)
downloadblackbird-op-linux-c70f5a60994058895384f593989a9fbe6fe6adee.tar.gz
blackbird-op-linux-c70f5a60994058895384f593989a9fbe6fe6adee.zip
[ARM] pxa: fix irq suspend/resume for pxa25x
PXA25x does not have IPR registers, saving and restoring should happen only for pxa27x and pxa3xx. Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/irq.c')
-rw-r--r--arch/arm/mach-pxa/irq.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 6112af431fa4..1beb40f692fc 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -164,8 +164,11 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
saved_icmr[i] = _ICMR(irq);
_ICMR(irq) = 0;
}
- for (i = 0; i < pxa_internal_irq_nr; i++)
- saved_ipr[i] = IPR(i);
+
+ if (cpu_is_pxa27x() || cpu_is_pxa3xx()) {
+ for (i = 0; i < pxa_internal_irq_nr; i++)
+ saved_ipr[i] = IPR(i);
+ }
return 0;
}
@@ -174,12 +177,15 @@ static int pxa_irq_resume(struct sys_device *dev)
{
int i, irq = PXA_IRQ(0);
+ if (cpu_is_pxa27x() || cpu_is_pxa3xx()) {
+ for (i = 0; i < pxa_internal_irq_nr; i++)
+ IPR(i) = saved_ipr[i];
+ }
+
for (i = 0; irq < PXA_IRQ(pxa_internal_irq_nr); i++, irq += 32) {
_ICMR(irq) = saved_icmr[i];
_ICLR(irq) = 0;
}
- for (i = 0; i < pxa_internal_irq_nr; i++)
- IPR(i) = saved_ipr[i];
ICCR = 1;
return 0;
OpenPOWER on IntegriCloud