aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2010-12-02 05:27:35 -0500
committerFelipe Balbi <balbi@ti.com>2010-12-10 03:21:26 -0500
commit496351413a227a6c0ea1a704d3d4c775d413fd08 (patch)
treee688488db9439ba5de6706260f0db4da612cc9d7 /drivers/usb/musb/omap2430.c
parentfa56df915d101770a495569473b4c13b1904087b (diff)
usb: musb: drop musb_platform_save/restore_context
... that can be easily folded into the musb_platform_suspend/resume calls. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index fa3154b03044..2659667a1994 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -258,21 +258,17 @@ static int omap2430_musb_init(struct musb *musb)
258 return 0; 258 return 0;
259} 259}
260 260
261#ifdef CONFIG_PM 261static void omap2430_save_context(struct musb *musb)
262void musb_platform_save_context(struct musb *musb,
263 struct musb_context_registers *musb_context)
264{ 262{
265 musb_context->otg_sysconfig = musb_readl(musb->mregs, OTG_SYSCONFIG); 263 musb->context.otg_sysconfig = musb_readl(musb->mregs, OTG_SYSCONFIG);
266 musb_context->otg_forcestandby = musb_readl(musb->mregs, OTG_FORCESTDBY); 264 musb->context.otg_forcestandby = musb_readl(musb->mregs, OTG_FORCESTDBY);
267} 265}
268 266
269void musb_platform_restore_context(struct musb *musb, 267static void omap2430_restore_context(struct musb *musb)
270 struct musb_context_registers *musb_context)
271{ 268{
272 musb_writel(musb->mregs, OTG_SYSCONFIG, musb_context->otg_sysconfig); 269 musb_writel(musb->mregs, OTG_SYSCONFIG, musb->context.otg_sysconfig);
273 musb_writel(musb->mregs, OTG_FORCESTDBY, musb_context->otg_forcestandby); 270 musb_writel(musb->mregs, OTG_FORCESTDBY, musb->context.otg_forcestandby);
274} 271}
275#endif
276 272
277static int omap2430_musb_suspend(struct musb *musb) 273static int omap2430_musb_suspend(struct musb *musb)
278{ 274{
@@ -287,6 +283,8 @@ static int omap2430_musb_suspend(struct musb *musb)
287 l |= ENABLEWAKEUP; /* enable wakeup */ 283 l |= ENABLEWAKEUP; /* enable wakeup */
288 musb_writel(musb->mregs, OTG_SYSCONFIG, l); 284 musb_writel(musb->mregs, OTG_SYSCONFIG, l);
289 285
286 omap2430_save_context(musb);
287
290 otg_set_suspend(musb->xceiv, 1); 288 otg_set_suspend(musb->xceiv, 1);
291 289
292 return 0; 290 return 0;
@@ -298,6 +296,8 @@ static int omap2430_musb_resume(struct musb *musb)
298 296
299 otg_set_suspend(musb->xceiv, 0); 297 otg_set_suspend(musb->xceiv, 0);
300 298
299 omap2430_restore_context(musb);
300
301 l = musb_readl(musb->mregs, OTG_SYSCONFIG); 301 l = musb_readl(musb->mregs, OTG_SYSCONFIG);
302 l &= ~ENABLEWAKEUP; /* disable wakeup */ 302 l &= ~ENABLEWAKEUP; /* disable wakeup */
303 musb_writel(musb->mregs, OTG_SYSCONFIG, l); 303 musb_writel(musb->mregs, OTG_SYSCONFIG, l);