diff options
author | Felipe Balbi <balbi@ti.com> | 2010-12-02 11:27:35 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2010-12-10 09:21:26 +0100 |
commit | 496351413a227a6c0ea1a704d3d4c775d413fd08 (patch) | |
tree | e688488db9439ba5de6706260f0db4da612cc9d7 /drivers/usb/musb/omap2430.c | |
parent | usb: musb: drop the set_clock magic (diff) | |
download | linux-496351413a227a6c0ea1a704d3d4c775d413fd08.tar.xz linux-496351413a227a6c0ea1a704d3d4c775d413fd08.zip |
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) return 0; } -#ifdef CONFIG_PM -void musb_platform_save_context(struct musb *musb, - struct musb_context_registers *musb_context) +static void omap2430_save_context(struct musb *musb) { - musb_context->otg_sysconfig = musb_readl(musb->mregs, OTG_SYSCONFIG); - musb_context->otg_forcestandby = musb_readl(musb->mregs, OTG_FORCESTDBY); + musb->context.otg_sysconfig = musb_readl(musb->mregs, OTG_SYSCONFIG); + musb->context.otg_forcestandby = musb_readl(musb->mregs, OTG_FORCESTDBY); } -void musb_platform_restore_context(struct musb *musb, - struct musb_context_registers *musb_context) +static void omap2430_restore_context(struct musb *musb) { - musb_writel(musb->mregs, OTG_SYSCONFIG, musb_context->otg_sysconfig); - musb_writel(musb->mregs, OTG_FORCESTDBY, musb_context->otg_forcestandby); + musb_writel(musb->mregs, OTG_SYSCONFIG, musb->context.otg_sysconfig); + musb_writel(musb->mregs, OTG_FORCESTDBY, musb->context.otg_forcestandby); } -#endif static int omap2430_musb_suspend(struct musb *musb) { @@ -287,6 +283,8 @@ static int omap2430_musb_suspend(struct musb *musb) l |= ENABLEWAKEUP; /* enable wakeup */ musb_writel(musb->mregs, OTG_SYSCONFIG, l); + omap2430_save_context(musb); + otg_set_suspend(musb->xceiv, 1); return 0; @@ -298,6 +296,8 @@ static int omap2430_musb_resume(struct musb *musb) otg_set_suspend(musb->xceiv, 0); + omap2430_restore_context(musb); + l = musb_readl(musb->mregs, OTG_SYSCONFIG); l &= ~ENABLEWAKEUP; /* disable wakeup */ musb_writel(musb->mregs, OTG_SYSCONFIG, l); |