There's a bug in calculation of IRQ_EINT_BIT introduced on the test
branch for pm changes for s3c by Ben Dooks fixed in this patch.
There's also a bit of a mystery about how wake gets to wake EINT
set of interrupts, I added a couple of lines that make it work for
EINT4+ but not sure what's meant to be there for EINT0-3.
Still, this gets GTA02 resume working again.
cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andy Green <andy@openmoko.com>
#define IRQ_EINT22 S3C2410_IRQ(50)
#define IRQ_EINT23 S3C2410_IRQ(51)
-#define IRQ_EINT_BIT(x) ((x) - (IRQ_EINT4 + 4))
+#define IRQ_EINT_BIT(x) ((x) - IRQ_EINT4 + 4)
#define IRQ_EINT(x) (((x) >= 4) ? (IRQ_EINT4 + (x) - 4) : (IRQ_EINT0 + (x)))
#define IRQ_LCD_FIFO S3C2410_IRQ(52)
{
unsigned long irqbit = 1 << (irqno - IRQ_EINT0);
+ if (irqno >= IRQ_EINT4)
+ return s3c_irqext_wake(irqno, state);
+
if (!(s3c_irqwake_intallow & irqbit))
return -ENOENT;