aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c24xx
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-12-11 19:24:12 -0500
committerBen Dooks <ben-linux@fluff.org>2009-03-08 08:35:36 -0400
commit56b34426888d35b3b6367c216bbfb17b82b4f0ac (patch)
tree435ec8f8856f222a95dd7c83ace6c01806ba8e5b /arch/arm/plat-s3c24xx
parent7299a40918e15d5f9b4bc7fcb02163c335d92e43 (diff)
[ARM] S3C: Make IRQ_EINT sleep control common
Move the IRQ_EINT sleep control to be available to all s3c impelmentations. Since s3c_irqext_wake is not large, place it in arch/arm/plat-s3c/pm.c as adding it to a new file would be a waste of compile time. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c24xx')
-rw-r--r--arch/arm/plat-s3c24xx/include/plat/irq.h2
-rw-r--r--arch/arm/plat-s3c24xx/irq-pm.c23
2 files changed, 1 insertions, 24 deletions
diff --git a/arch/arm/plat-s3c24xx/include/plat/irq.h b/arch/arm/plat-s3c24xx/include/plat/irq.h
index 97b6884ea0dc..69e1be8bec35 100644
--- a/arch/arm/plat-s3c24xx/include/plat/irq.h
+++ b/arch/arm/plat-s3c24xx/include/plat/irq.h
@@ -108,9 +108,7 @@ s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
108 108
109#ifdef CONFIG_PM 109#ifdef CONFIG_PM
110extern int s3c_irq_wake(unsigned int irqno, unsigned int state); 110extern int s3c_irq_wake(unsigned int irqno, unsigned int state);
111extern int s3c_irqext_wake(unsigned int irqno, unsigned int state);
112#else 111#else
113#define s3c_irqext_wake NULL
114#define s3c_irq_wake NULL 112#define s3c_irq_wake NULL
115#endif 113#endif
116 114
diff --git a/arch/arm/plat-s3c24xx/irq-pm.c b/arch/arm/plat-s3c24xx/irq-pm.c
index 86c68804f098..b7acf1a8ecd2 100644
--- a/arch/arm/plat-s3c24xx/irq-pm.c
+++ b/arch/arm/plat-s3c24xx/irq-pm.c
@@ -28,12 +28,9 @@
28*/ 28*/
29 29
30unsigned long s3c_irqwake_intallow = 1L << (IRQ_RTC - IRQ_EINT0) | 0xfL; 30unsigned long s3c_irqwake_intallow = 1L << (IRQ_RTC - IRQ_EINT0) | 0xfL;
31unsigned long s3c_irqwake_intmask = 0xffffffffL;
32unsigned long s3c_irqwake_eintallow = 0x0000fff0L; 31unsigned long s3c_irqwake_eintallow = 0x0000fff0L;
33unsigned long s3c_irqwake_eintmask = 0xffffffffL;
34 32
35int 33int s3c_irq_wake(unsigned int irqno, unsigned int state)
36s3c_irq_wake(unsigned int irqno, unsigned int state)
37{ 34{
38 unsigned long irqbit = 1 << (irqno - IRQ_EINT0); 35 unsigned long irqbit = 1 << (irqno - IRQ_EINT0);
39 36
@@ -51,24 +48,6 @@ s3c_irq_wake(unsigned int irqno, unsigned int state)
51 return 0; 48 return 0;
52} 49}
53 50
54int s3c_irqext_wake(unsigned int irqno, unsigned int state)
55{
56 unsigned long bit = 1L << (irqno - EXTINT_OFF);
57
58 if (!(s3c_irqwake_eintallow & bit))
59 return -ENOENT;
60
61 printk(KERN_INFO "wake %s for irq %d\n",
62 state ? "enabled" : "disabled", irqno);
63
64 if (!state)
65 s3c_irqwake_eintmask |= bit;
66 else
67 s3c_irqwake_eintmask &= ~bit;
68
69 return 0;
70}
71
72static struct sleep_save irq_save[] = { 51static struct sleep_save irq_save[] = {
73 SAVE_ITEM(S3C2410_INTMSK), 52 SAVE_ITEM(S3C2410_INTMSK),
74 SAVE_ITEM(S3C2410_INTSUBMSK), 53 SAVE_ITEM(S3C2410_INTSUBMSK),