Commit 8e3b6ea0 authored by Felipe Balbi's avatar Felipe Balbi Committed by Tony Lindgren

USB: MUSB: Be sure that we enable musb->clock

If CONFIG_OMAP_RESET_CLOCKS is enabled, musb->clock would
be disabled because nobody was enabling it.

Be sure that omap2430.c enables musb->clock to avoid problems
later.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent ffb76d4a
...@@ -246,6 +246,9 @@ int __init musb_platform_init(struct musb *musb) ...@@ -246,6 +246,9 @@ int __init musb_platform_init(struct musb *musb)
int musb_platform_suspend(struct musb *musb) int musb_platform_suspend(struct musb *musb)
{ {
if (!musb->clock)
return 0;
/* in any role */ /* in any role */
OTG_FORCESTDBY_REG &= ~ENABLEFORCE; /* disable MSTANDBY */ OTG_FORCESTDBY_REG &= ~ENABLEFORCE; /* disable MSTANDBY */
OTG_SYSCONFIG_REG &= FORCESTDBY; /* enable force standby */ OTG_SYSCONFIG_REG &= FORCESTDBY; /* enable force standby */
...@@ -257,14 +260,27 @@ int musb_platform_suspend(struct musb *musb) ...@@ -257,14 +260,27 @@ int musb_platform_suspend(struct musb *musb)
if (musb->xceiv.set_suspend) if (musb->xceiv.set_suspend)
musb->xceiv.set_suspend(&musb->xceiv, 1); musb->xceiv.set_suspend(&musb->xceiv, 1);
if (musb->set_clock)
musb->set_clock(musb->clock, 0);
else
clk_disable(musb->clock);
return 0; return 0;
} }
int musb_platform_resume(struct musb *musb) int musb_platform_resume(struct musb *musb)
{ {
if (!musb->clock)
return 0;
if (musb->xceiv.set_suspend) if (musb->xceiv.set_suspend)
musb->xceiv.set_suspend(&musb->xceiv, 0); musb->xceiv.set_suspend(&musb->xceiv, 0);
if (musb->set_clock)
musb->set_clock(musb->clock, 1);
else
clk_enable(musb->clock);
OTG_FORCESTDBY_REG &= ~ENABLEFORCE; /* disable MSTANDBY */ OTG_FORCESTDBY_REG &= ~ENABLEFORCE; /* disable MSTANDBY */
OTG_SYSCONFIG_REG |= SMARTSTDBY; /* enable smart standby */ OTG_SYSCONFIG_REG |= SMARTSTDBY; /* enable smart standby */
OTG_SYSCONFIG_REG &= ~AUTOIDLE; /* disable auto idle */ OTG_SYSCONFIG_REG &= ~AUTOIDLE; /* disable auto idle */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment