X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=arch%2Farm%2Fmach-s3c2410%2Fs3c2410-pm.c;h=8bb6e5e21f591b8716569f562a694ac3cd797258;hb=3a960f7e350de5d087b88a4c06df236e0f4186fd;hp=9cd0c104f1cbc05efdcef9d0279fc0b35dbc38da;hpb=9073341c2ba5d5e77b3d05d84cf9e3a16e8a7902;p=pandora-kernel.git diff --git a/arch/arm/mach-s3c2410/s3c2410-pm.c b/arch/arm/mach-s3c2410/s3c2410-pm.c index 9cd0c104f1cb..8bb6e5e21f59 100644 --- a/arch/arm/mach-s3c2410/s3c2410-pm.c +++ b/arch/arm/mach-s3c2410/s3c2410-pm.c @@ -66,12 +66,28 @@ static void s3c2410_pm_prepare(void) __raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM)); } + /* the RX3715 uses similar code and the same H1940 and the + * same offsets for resume and checksum pointers */ + + if (machine_is_rx3715()) { + void *base = phys_to_virt(H1940_SUSPEND_CHECK); + unsigned long ptr; + unsigned long calc = 0; + + /* generate check for the bootloader to check on resume */ + + for (ptr = 0; ptr < 0x40000; ptr += 0x4) + calc += __raw_readl(base+ptr); + + __raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM)); + } + if ( machine_is_aml_m5900() ) s3c2410_gpio_setpin(S3C2410_GPF2, 1); } -int s3c2410_pm_resume(struct sys_device *dev) +static int s3c2410_pm_resume(struct sys_device *dev) { unsigned long tmp; @@ -95,6 +111,7 @@ static int s3c2410_pm_add(struct sys_device *dev) return 0; } +#if defined(CONFIG_CPU_S3C2410) static struct sysdev_driver s3c2410_pm_driver = { .add = s3c2410_pm_add, .resume = s3c2410_pm_resume, @@ -108,7 +125,9 @@ static int __init s3c2410_pm_drvinit(void) } arch_initcall(s3c2410_pm_drvinit); +#endif +#if defined(CONFIG_CPU_S3C2440) static struct sysdev_driver s3c2440_pm_driver = { .add = s3c2410_pm_add, .resume = s3c2410_pm_resume, @@ -120,7 +139,9 @@ static int __init s3c2440_pm_drvinit(void) } arch_initcall(s3c2440_pm_drvinit); +#endif +#if defined(CONFIG_CPU_S3C2442) static struct sysdev_driver s3c2442_pm_driver = { .add = s3c2410_pm_add, .resume = s3c2410_pm_resume, @@ -132,3 +153,4 @@ static int __init s3c2442_pm_drvinit(void) } arch_initcall(s3c2442_pm_drvinit); +#endif