aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-11-25 22:26:40 +0100
committerFelipe Balbi <balbi@ti.com>2013-11-26 10:35:15 -0600
commitc338412b5dedf405d3f8ba3af1a61fa623319e1d (patch)
tree67f111f054b8ae3b1658644d3ff46c3c9ba4e626 /drivers/usb/musb
parente0a6104e066595bcf791381a23b568ab0a890707 (diff)
usb: musb: unconditionally save and restore the context on suspend
It appears not all platforms featuring a musb core need to save the musb core registers at suspend time and restore them on resume. The dsps platform does, however, and because it shouldn't cause any trouble on other platforms, do it unconditionally for all of them. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_core.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 377ef9b29c7..ac96e4ce7e9 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2224,16 +2224,28 @@ static int musb_suspend(struct device *dev)
*/
}
+ musb_save_context(musb);
+
spin_unlock_irqrestore(&musb->lock, flags);
return 0;
}
static int musb_resume_noirq(struct device *dev)
{
- /* for static cmos like DaVinci, register values were preserved
+ struct musb *musb = dev_to_musb(dev);
+
+ /*
+ * For static cmos like DaVinci, register values were preserved
* unless for some reason the whole soc powered down or the USB
* module got reset through the PSC (vs just being disabled).
+ *
+ * For the DSPS glue layer though, a full register restore has to
+ * be done. As it shouldn't harm other platforms, we do it
+ * unconditionally.
*/
+
+ musb_restore_context(musb);
+
return 0;
}