pm.c (5ab356626f3cf97f00280f17a52e4b5b4a13e038) pm.c (64fc2a947a9873700929ec0ef02b4654a04e0476)
1/* linux/arch/arm/mach-s5pv210/pm.c
2 *
3 * Copyright (c) 2010-2014 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * S5PV210 - Power Management support
7 *
8 * Based on arch/arm/mach-s3c2410/pm.c

--- 55 unchanged lines hidden (view full) ---

64{
65 unsigned int tmp;
66
67 /* Set wake-up mask registers */
68 __raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK);
69 __raw_writel(s5pv210_irqwake_intmask, S5P_WAKEUP_MASK);
70
71 /* ensure at least INFORM0 has the resume address */
1/* linux/arch/arm/mach-s5pv210/pm.c
2 *
3 * Copyright (c) 2010-2014 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
5 *
6 * S5PV210 - Power Management support
7 *
8 * Based on arch/arm/mach-s3c2410/pm.c

--- 55 unchanged lines hidden (view full) ---

64{
65 unsigned int tmp;
66
67 /* Set wake-up mask registers */
68 __raw_writel(exynos_get_eint_wake_mask(), S5P_EINT_WAKEUP_MASK);
69 __raw_writel(s5pv210_irqwake_intmask, S5P_WAKEUP_MASK);
70
71 /* ensure at least INFORM0 has the resume address */
72 __raw_writel(virt_to_phys(s5pv210_cpu_resume), S5P_INFORM0);
72 __raw_writel(__pa_symbol(s5pv210_cpu_resume), S5P_INFORM0);
73
74 tmp = __raw_readl(S5P_SLEEP_CFG);
75 tmp &= ~(S5P_SLEEP_CFG_OSC_EN | S5P_SLEEP_CFG_USBOSC_EN);
76 __raw_writel(tmp, S5P_SLEEP_CFG);
77
78 /* WFI for SLEEP mode configuration by SYSCON */
79 tmp = __raw_readl(S5P_PWR_CFG);
80 tmp &= S5P_CFG_WFI_CLEAN;

--- 69 unchanged lines hidden (view full) ---

150 .valid = suspend_valid_only_mem,
151};
152
153/*
154 * Syscore operations used to delay restore of certain registers.
155 */
156static void s5pv210_pm_resume(void)
157{
73
74 tmp = __raw_readl(S5P_SLEEP_CFG);
75 tmp &= ~(S5P_SLEEP_CFG_OSC_EN | S5P_SLEEP_CFG_USBOSC_EN);
76 __raw_writel(tmp, S5P_SLEEP_CFG);
77
78 /* WFI for SLEEP mode configuration by SYSCON */
79 tmp = __raw_readl(S5P_PWR_CFG);
80 tmp &= S5P_CFG_WFI_CLEAN;

--- 69 unchanged lines hidden (view full) ---

150 .valid = suspend_valid_only_mem,
151};
152
153/*
154 * Syscore operations used to delay restore of certain registers.
155 */
156static void s5pv210_pm_resume(void)
157{
158 u32 tmp;
159
160 tmp = __raw_readl(S5P_OTHERS);
161 tmp |= (S5P_OTHERS_RET_IO | S5P_OTHERS_RET_CF |\
162 S5P_OTHERS_RET_MMC | S5P_OTHERS_RET_UART);
163 __raw_writel(tmp , S5P_OTHERS);
164
158 s3c_pm_do_restore_core(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save));
159}
160
161static struct syscore_ops s5pv210_pm_syscore_ops = {
162 .resume = s5pv210_pm_resume,
163};
164
165/*
166 * Initialization entry point.
167 */
168void __init s5pv210_pm_init(void)
169{
170 register_syscore_ops(&s5pv210_pm_syscore_ops);
171 suspend_set_ops(&s5pv210_suspend_ops);
172}
165 s3c_pm_do_restore_core(s5pv210_core_save, ARRAY_SIZE(s5pv210_core_save));
166}
167
168static struct syscore_ops s5pv210_pm_syscore_ops = {
169 .resume = s5pv210_pm_resume,
170};
171
172/*
173 * Initialization entry point.
174 */
175void __init s5pv210_pm_init(void)
176{
177 register_syscore_ops(&s5pv210_pm_syscore_ops);
178 suspend_set_ops(&s5pv210_suspend_ops);
179}