From 26f908186f923291999833e9d563259834bdca06 Mon Sep 17 00:00:00 2001 From: David Anders Date: Tue, 26 Sep 2006 17:46:00 +0100 Subject: [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 Signed-off-by: Ben Dooks Signed-off-by: Russell King --- arch/arm/mach-s3c2410/s3c2410-pm.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/mach-s3c2410/s3c2410-pm.c') diff --git a/arch/arm/mach-s3c2410/s3c2410-pm.c b/arch/arm/mach-s3c2410/s3c2410-pm.c index 3080d25a12de..e51d76669512 100644 --- a/arch/arm/mach-s3c2410/s3c2410-pm.c +++ b/arch/arm/mach-s3c2410/s3c2410-pm.c @@ -29,6 +29,8 @@ #include #include +#include + #include #include "cpu.h" @@ -49,6 +51,10 @@ static void s3c2410_pm_prepare(void) DBG("GSTATUS3 0x%08x\n", __raw_readl(S3C2410_GSTATUS3)); DBG("GSTATUS4 0x%08x\n", __raw_readl(S3C2410_GSTATUS4)); + + if ( machine_is_aml_m5900() ) + s3c2410_gpio_setpin(S3C2410_GPF2, 1); + } int s3c2410_pm_resume(struct sys_device *dev) @@ -61,6 +67,9 @@ int s3c2410_pm_resume(struct sys_device *dev) tmp &= S3C2410_GSTATUS2_OFFRESET; __raw_writel(tmp, S3C2410_GSTATUS2); + if ( machine_is_aml_m5900() ) + s3c2410_gpio_setpin(S3C2410_GPF2, 0); + return 0; } -- cgit v1.2.2