Release 4.11 arch/arm/mach-s3c24xx/pm-s3c2416.c
/* linux/arch/arm/mach-s3c2416/pm.c
*
* Copyright (c) 2010 Samsung Electronics Co., Ltd.
* http://www.samsung.com
*
* S3C2416 - PM support (Based on Ben Dooks' S3C2412 PM support)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/io.h>
#include <asm/cacheflush.h>
#include <mach/regs-s3c2443-clock.h>
#include <plat/cpu.h>
#include <plat/pm.h>
#include "s3c2412-power.h"
#ifdef CONFIG_PM_SLEEP
extern void s3c2412_sleep_enter(void);
static int s3c2416_cpu_suspend(unsigned long arg)
{
/* enable wakeup sources regardless of battery state */
__raw_writel(S3C2443_PWRCFG_SLEEP, S3C2443_PWRCFG);
/* set the mode as sleep, 2BED represents "Go to BED" */
__raw_writel(0x2BED, S3C2443_PWRMODE);
s3c2412_sleep_enter();
pr_info("Failed to suspend the system\n");
return 1; /* Aborting suspend */
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Abhilash Kesavan | 31 | 81.58% | 2 | 50.00% |
Russell King | 7 | 18.42% | 2 | 50.00% |
Total | 38 | 100.00% | 4 | 100.00% |
static void s3c2416_pm_prepare(void)
{
/*
* write the magic value u-boot uses to check for resume into
* the INFORM0 register, and ensure INFORM1 is set to the
* correct address to resume from.
*/
__raw_writel(0x2BED, S3C2412_INFORM0);
__raw_writel(__pa_symbol(s3c_cpu_resume), S3C2412_INFORM1);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Abhilash Kesavan | 25 | 96.15% | 1 | 50.00% |
Florian Fainelli | 1 | 3.85% | 1 | 50.00% |
Total | 26 | 100.00% | 2 | 100.00% |
static int s3c2416_pm_add(struct device *dev, struct subsys_interface *sif)
{
pm_cpu_prep = s3c2416_pm_prepare;
pm_cpu_sleep = s3c2416_cpu_suspend;
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Abhilash Kesavan | 20 | 74.07% | 1 | 33.33% |
Heiko Stübner | 5 | 18.52% | 1 | 33.33% |
Kay Sievers | 2 | 7.41% | 1 | 33.33% |
Total | 27 | 100.00% | 3 | 100.00% |
static struct subsys_interface s3c2416_pm_interface = {
.name = "s3c2416_pm",
.subsys = &s3c2416_subsys,
.add_dev = s3c2416_pm_add,
};
static __init int s3c2416_pm_init(void)
{
return subsys_interface_register(&s3c2416_pm_interface);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Abhilash Kesavan | 8 | 50.00% | 1 | 33.33% |
Rafael J. Wysocki | 6 | 37.50% | 1 | 33.33% |
Kay Sievers | 2 | 12.50% | 1 | 33.33% |
Total | 16 | 100.00% | 3 | 100.00% |
arch_initcall(s3c2416_pm_init);
#endif
static void s3c2416_pm_resume(void)
{
/* unset the return-from-sleep amd inform flags */
__raw_writel(0x0, S3C2443_PWRMODE);
__raw_writel(0x0, S3C2412_INFORM0);
__raw_writel(0x0, S3C2412_INFORM1);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Abhilash Kesavan | 28 | 93.33% | 1 | 50.00% |
Rafael J. Wysocki | 2 | 6.67% | 1 | 50.00% |
Total | 30 | 100.00% | 2 | 100.00% |
struct syscore_ops s3c2416_pm_syscore_ops = {
.resume = s3c2416_pm_resume,
};
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Abhilash Kesavan | 145 | 68.08% | 2 | 20.00% |
Rafael J. Wysocki | 27 | 12.68% | 1 | 10.00% |
Kay Sievers | 19 | 8.92% | 1 | 10.00% |
Russell King | 7 | 3.29% | 2 | 20.00% |
Heiko Stübner | 5 | 2.35% | 1 | 10.00% |
Arnd Bergmann | 5 | 2.35% | 1 | 10.00% |
Kukjin Kim | 4 | 1.88% | 1 | 10.00% |
Florian Fainelli | 1 | 0.47% | 1 | 10.00% |
Total | 213 | 100.00% | 10 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.