summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
authorAjay Kumar Gupta <ajay.gupta@ti.com>2010-01-21 15:33:52 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 14:54:38 -0800
commit4f712e010b2da1cc01c178922f2eb5aaeae461b6 (patch)
tree4341a8c4f1e8184b0a727a9746be74267d20f68f /drivers/usb/musb/omap2430.c
parent8af6096caf8b3fb7ee33e636c44a29f373d27df5 (diff)
downloadop-kernel-dev-4f712e010b2da1cc01c178922f2eb5aaeae461b6.zip
op-kernel-dev-4f712e010b2da1cc01c178922f2eb5aaeae461b6.tar.gz
usb: musb: Add context save and restore support
Adding support for MUSB register save and restore during system suspend and resume. Changes: - Added musb_save/restore_context() functions - Added platform specific musb_platform_save/restore_context() to handle platform specific jobs. - Maintaining BlackFin compatibility by adding read/write functions for registers which are not available in BlackFin Tested system suspend and resume on OMAP3EVM board. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 83beeac..15a3f27 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -255,6 +255,22 @@ int __init musb_platform_init(struct musb *musb)
return 0;
}
+#ifdef CONFIG_PM
+void musb_platform_save_context(struct musb_context_registers
+ *musb_context)
+{
+ musb_context->otg_sysconfig = omap_readl(OTG_SYSCONFIG);
+ musb_context->otg_forcestandby = omap_readl(OTG_FORCESTDBY);
+}
+
+void musb_platform_restore_context(struct musb_context_registers
+ *musb_context)
+{
+ omap_writel(musb_context->otg_sysconfig, OTG_SYSCONFIG);
+ omap_writel(musb_context->otg_forcestandby, OTG_FORCESTDBY);
+}
+#endif
+
int musb_platform_suspend(struct musb *musb)
{
u32 l;
OpenPOWER on IntegriCloud