aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-02-06 12:39:31 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-02-22 12:11:25 -0500
commit2e2f3d3792de5913897b6bb49ac13915b0b020d5 (patch)
tree02126d58ee15cf94c7335604ef8f9e8eb21d7378 /arch/arm/plat-samsung
parent96c20015dae59e58d055c1e2e17a811e0d1f1d03 (diff)
ARM: pm: convert samsung platforms to generic suspend/resume support
Tested-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/include/plat/pm.h12
-rw-r--r--arch/arm/plat-samsung/pm.c16
2 files changed, 2 insertions, 26 deletions
diff --git a/arch/arm/plat-samsung/include/plat/pm.h b/arch/arm/plat-samsung/include/plat/pm.h
index d9025e377675..4aa697dfe13f 100644
--- a/arch/arm/plat-samsung/include/plat/pm.h
+++ b/arch/arm/plat-samsung/include/plat/pm.h
@@ -50,13 +50,11 @@ extern unsigned char pm_uart_udivslot; /* true to save UART UDIVSLOT */
50 50
51/* from sleep.S */ 51/* from sleep.S */
52 52
53extern int s3c_cpu_save(unsigned long *saveblk); 53extern int s3c_cpu_save(unsigned long *saveblk, long);
54extern void s3c_cpu_resume(void); 54extern void s3c_cpu_resume(void);
55 55
56extern void s3c2410_cpu_suspend(void); 56extern void s3c2410_cpu_suspend(void);
57 57
58extern unsigned long s3c_sleep_save_phys;
59
60/* sleep save info */ 58/* sleep save info */
61 59
62/** 60/**
@@ -179,13 +177,5 @@ extern void s3c_pm_restore_gpios(void);
179 */ 177 */
180extern void s3c_pm_save_gpios(void); 178extern void s3c_pm_save_gpios(void);
181 179
182/**
183 * s3c_pm_cb_flushcache - callback for assembly code
184 *
185 * Callback to issue flush_cache_all() as this call is
186 * not a directly callable object.
187 */
188extern void s3c_pm_cb_flushcache(void);
189
190extern void s3c_pm_save_core(void); 180extern void s3c_pm_save_core(void);
191extern void s3c_pm_restore_core(void); 181extern void s3c_pm_restore_core(void);
diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
index 02d531fb3f81..d5b58d31903c 100644
--- a/arch/arm/plat-samsung/pm.c
+++ b/arch/arm/plat-samsung/pm.c
@@ -241,8 +241,6 @@ void (*pm_cpu_sleep)(void);
241 241
242static int s3c_pm_enter(suspend_state_t state) 242static int s3c_pm_enter(suspend_state_t state)
243{ 243{
244 static unsigned long regs_save[16];
245
246 /* ensure the debug is initialised (if enabled) */ 244 /* ensure the debug is initialised (if enabled) */
247 245
248 s3c_pm_debug_init(); 246 s3c_pm_debug_init();
@@ -266,12 +264,6 @@ static int s3c_pm_enter(suspend_state_t state)
266 return -EINVAL; 264 return -EINVAL;
267 } 265 }
268 266
269 /* store the physical address of the register recovery block */
270
271 s3c_sleep_save_phys = virt_to_phys(regs_save);
272
273 S3C_PMDBG("s3c_sleep_save_phys=0x%08lx\n", s3c_sleep_save_phys);
274
275 /* save all necessary core registers not covered by the drivers */ 267 /* save all necessary core registers not covered by the drivers */
276 268
277 s3c_pm_save_gpios(); 269 s3c_pm_save_gpios();
@@ -305,7 +297,7 @@ static int s3c_pm_enter(suspend_state_t state)
305 * we resume as it saves its own register state and restores it 297 * we resume as it saves its own register state and restores it
306 * during the resume. */ 298 * during the resume. */
307 299
308 s3c_cpu_save(regs_save); 300 s3c_cpu_save(0, PLAT_PHYS_OFFSET - PAGE_OFFSET);
309 301
310 /* restore the cpu state using the kernel's cpu init code. */ 302 /* restore the cpu state using the kernel's cpu init code. */
311 303
@@ -336,12 +328,6 @@ static int s3c_pm_enter(suspend_state_t state)
336 return 0; 328 return 0;
337} 329}
338 330
339/* callback from assembly code */
340void s3c_pm_cb_flushcache(void)
341{
342 flush_cache_all();
343}
344
345static int s3c_pm_prepare(void) 331static int s3c_pm_prepare(void)
346{ 332{
347 /* prepare check area if configured */ 333 /* prepare check area if configured */