diff options
author | Felipe Balbi <balbi@ti.com> | 2010-12-02 05:27:35 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2010-12-10 03:21:26 -0500 |
commit | 496351413a227a6c0ea1a704d3d4c775d413fd08 (patch) | |
tree | e688488db9439ba5de6706260f0db4da612cc9d7 /drivers/usb/musb/omap2430.c | |
parent | fa56df915d101770a495569473b4c13b1904087b (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.c | 20 |
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 | 261 | static void omap2430_save_context(struct musb *musb) |
262 | void 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 | ||
269 | void musb_platform_restore_context(struct musb *musb, | 267 | static 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 | ||
277 | static int omap2430_musb_suspend(struct musb *musb) | 273 | static 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); |