aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-s3c/include
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-12-12 00:24:06 +0000
committerBen Dooks <ben-linux@fluff.org>2009-03-08 12:23:51 +0000
commit6419711a164ba1304fa8fbb75ae9485455e04dcd (patch)
tree15fe79b0ffff33d253258b849f1b69ac4c2c3bbe /arch/arm/plat-s3c/include
parenta3f66351b3cc89011e8a34068c245b413ce696d6 (diff)
[ARM] S3C: Move PM support functions to common location
Start moving the PM code by moving all the common support functions to a common location in arch/arm/plat-s3c. With the move we rename the functions from s3cxxx_ to s3c_ to fit the new location. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c/include')
-rw-r--r--arch/arm/plat-s3c/include/plat/pm.h36
1 files changed, 33 insertions, 3 deletions
diff --git a/arch/arm/plat-s3c/include/plat/pm.h b/arch/arm/plat-s3c/include/plat/pm.h
index cc623667e48..a1520997ab8 100644
--- a/arch/arm/plat-s3c/include/plat/pm.h
+++ b/arch/arm/plat-s3c/include/plat/pm.h
@@ -1,6 +1,7 @@
/* linux/include/asm-arm/plat-s3c24xx/pm.h
*
* Copyright (c) 2004 Simtec Electronics
+ * http://armlinux.simtec.co.uk/
* Written by Ben Dooks, <ben@simtec.co.uk>
*
* This program is free software; you can redistribute it and/or modify
@@ -49,10 +50,18 @@ extern int s3c2410_cpu_save(unsigned long *saveblk);
extern void s3c2410_cpu_suspend(void);
extern void s3c2410_cpu_resume(void);
-extern unsigned long s3c2410_sleep_save_phys;
+extern unsigned long s3c_sleep_save_phys;
/* sleep save info */
+/**
+ * struct sleep_save - save information for shared peripherals.
+ * @reg: Pointer to the register to save.
+ * @val: Holder for the value saved from reg.
+ *
+ * This describes a list of registers which is used by the pm core and
+ * other subsystem to save and restore register values over suspend.
+ */
struct sleep_save {
void __iomem *reg;
unsigned long val;
@@ -61,8 +70,11 @@ struct sleep_save {
#define SAVE_ITEM(x) \
{ .reg = (x) }
-extern void s3c2410_pm_do_save(struct sleep_save *ptr, int count);
-extern void s3c2410_pm_do_restore(struct sleep_save *ptr, int count);
+/* helper functions to save/restore lists of registers. */
+
+extern void s3c_pm_do_save(struct sleep_save *ptr, int count);
+extern void s3c_pm_do_restore(struct sleep_save *ptr, int count);
+extern void s3c_pm_do_restore_core(struct sleep_save *ptr, int count);
#ifdef CONFIG_PM
extern int s3c24xx_irq_suspend(struct sys_device *dev, pm_message_t state);
@@ -71,3 +83,21 @@ extern int s3c24xx_irq_resume(struct sys_device *dev);
#define s3c24xx_irq_suspend NULL
#define s3c24xx_irq_resume NULL
#endif
+
+/* PM debug functions */
+
+#ifdef CONFIG_S3C2410_PM_DEBUG
+/**
+ * s3c_pm_dbg() - low level debug function for use in suspend/resume.
+ * @msg: The message to print.
+ *
+ * This function is used mainly to debug the resume process before the system
+ * can rely on printk/console output. It uses the low-level debugging output
+ * routine printascii() to do its work.
+ */
+extern void s3c_pm_dbg(const char *msg, ...);
+
+#define S3C_PMDBG(fmt...) s3c_pm_dbg(fmt)
+#else
+#define S3C_PMDBG(fmt...) printk(KERN_DEBUG fmt)
+#endif