diff options
author | David Anders <danders@amltd.com> | 2006-09-26 18:46:00 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-28 00:44:33 +0200 |
commit | 26f908186f923291999833e9d563259834bdca06 (patch) | |
tree | 3fd7656ade08d17d6213fdaa27c86bda6f4b0b8b /arch/arm/mach-s3c2410/mach-amlm5900.c | |
parent | [ARM] kthread: switch arch/arm/kernel/apm.c (diff) | |
download | linux-26f908186f923291999833e9d563259834bdca06.tar.xz linux-26f908186f923291999833e9d563259834bdca06.zip |
[ARM] 3862/2: S3C2410 - add basic power management support for AML M5900 series
this patch registers the wakeup irq, sets a gpio pin to indicate the
status of system for suspend/resume operations, and adds the machine to
the supported machines for use with the simtec-pm
Signed-off-by: David Anders <danders@amltd.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410/mach-amlm5900.c')
-rw-r--r-- | arch/arm/mach-s3c2410/mach-amlm5900.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c index 0c9b7dafbe90..ba5109af40b4 100644 --- a/arch/arm/mach-s3c2410/mach-amlm5900.c +++ b/arch/arm/mach-s3c2410/mach-amlm5900.c @@ -225,13 +225,34 @@ static struct s3c2410fb_mach_info __initdata amlm5900_lcd_info = { }; #endif -static void __init amlm5900_init(void) +static irqreturn_t +amlm5900_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) { + return IRQ_HANDLED; +} +static void amlm5900_init_pm(void) +{ + int ret = 0; + + ret = request_irq(IRQ_EINT9, &amlm5900_wake_interrupt, + IRQF_TRIGGER_RISING | IRQF_SHARED, + "amlm5900_wakeup", &amlm5900_wake_interrupt); + if (ret != 0) { + printk(KERN_ERR "AML-M5900: no wakeup irq, %d?\n", ret); + } else { + enable_irq_wake(IRQ_EINT9); + /* configure the suspend/resume status pin */ + s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_OUTP); + s3c2410_gpio_pullup(S3C2410_GPF2, 0); + } +} +static void __init amlm5900_init(void) +{ + amlm5900_init_pm(); #ifdef CONFIG_FB_S3C2410 s3c24xx_fb_set_platdata(&amlm5900_lcd_info); #endif - } MACHINE_START(AML_M5900, "AML_M5900") |