diff options
author | Daniel Mack <zonque@gmail.com> | 2013-11-25 16:26:40 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-11-26 11:35:15 -0500 |
commit | c338412b5dedf405d3f8ba3af1a61fa623319e1d (patch) | |
tree | 67f111f054b8ae3b1658644d3ff46c3c9ba4e626 /drivers/usb/musb/musb_core.c | |
parent | e0a6104e066595bcf791381a23b568ab0a890707 (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/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 377ef9b29c73..ac96e4ce7e95 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) | |||
2224 | */ | 2224 | */ |
2225 | } | 2225 | } |
2226 | 2226 | ||
2227 | musb_save_context(musb); | ||
2228 | |||
2227 | spin_unlock_irqrestore(&musb->lock, flags); | 2229 | spin_unlock_irqrestore(&musb->lock, flags); |
2228 | return 0; | 2230 | return 0; |
2229 | } | 2231 | } |
2230 | 2232 | ||
2231 | static int musb_resume_noirq(struct device *dev) | 2233 | static int musb_resume_noirq(struct device *dev) |
2232 | { | 2234 | { |
2233 | /* for static cmos like DaVinci, register values were preserved | 2235 | struct musb *musb = dev_to_musb(dev); |
2236 | |||
2237 | /* | ||
2238 | * For static cmos like DaVinci, register values were preserved | ||
2234 | * unless for some reason the whole soc powered down or the USB | 2239 | * unless for some reason the whole soc powered down or the USB |
2235 | * module got reset through the PSC (vs just being disabled). | 2240 | * module got reset through the PSC (vs just being disabled). |
2241 | * | ||
2242 | * For the DSPS glue layer though, a full register restore has to | ||
2243 | * be done. As it shouldn't harm other platforms, we do it | ||
2244 | * unconditionally. | ||
2236 | */ | 2245 | */ |
2246 | |||
2247 | musb_restore_context(musb); | ||
2248 | |||
2237 | return 0; | 2249 | return 0; |
2238 | } | 2250 | } |
2239 | 2251 | ||