aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Cai <R63905@freescale.com>2010-12-15 14:55:28 +0800
committerRobby Cai <R63905@freescale.com>2010-12-15 18:45:12 +0800
commita4bdc8d89725f891a1ae485be9feb22cdeb0589b (patch)
tree87d52b8e2c4669630f6ce34f2864091bd84b3b26
parenta7d0bcf12db5915b4a083ea0023f8cadec1690d9 (diff)
ENGR00136990-1 MX50: fix system resume failure issue due to ZQ calibration
need to make sure last ZQ calib run completed and no more ZQ calib to be run during suspend, and resume ZQ calib until the system resumes. Signed-off-by: Robby Cai <R63905@freescale.com>
-rw-r--r--arch/arm/plat-mxc/zq_calib.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/plat-mxc/zq_calib.c b/arch/arm/plat-mxc/zq_calib.c
index bf0a693d9f8..db9a6697745 100644
--- a/arch/arm/plat-mxc/zq_calib.c
+++ b/arch/arm/plat-mxc/zq_calib.c
@@ -355,6 +355,25 @@ static int __devexit mxc_zq_calib_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM
+static int zq_calib_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ flush_delayed_work(&zq_work);
+
+ return 0;
+}
+
+static int zq_calib_resume(struct platform_device *pdev)
+{
+ mxc_zq_main(NULL);
+
+ return 0;
+}
+#else
+#define zq_calib_suspend NULL
+#define zq_calib_resume NULL
+#endif
+
static struct platform_driver mxc_zq_calib_driver = {
.driver = {
.owner = THIS_MODULE,
@@ -362,6 +381,8 @@ static struct platform_driver mxc_zq_calib_driver = {
},
.probe = mxc_zq_calib_probe,
.remove = __exit_p(mxc_zq_calib_remove),
+ .suspend = zq_calib_suspend,
+ .resume = zq_calib_resume,
};
static int __init mxc_zq_calib_init(void)