diff options
author | Hema HK <hemahk@ti.com> | 2011-09-07 12:19:24 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 04:51:40 -0500 |
commit | e25bec160158abe86c276d7d206264afc3646281 (patch) | |
tree | 3d2286ff2932971b6950207fde1c8f522da2a46e /drivers/usb/musb | |
parent | ea737554451d9fae1207e84a3d2c495bbfcd3f08 (diff) |
usb: musb: omap2+: save and restore OTG_INTERFSEL
we need to save and restore OTG_INTERFSEL register
else we will be unable to function on resume after
OFF mode.
Reported-by: Devaraj Rangasamy <dev@ti.com>
Signed-off-by: Hema HK <hemahk@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_core.h | 1 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h index b3c065ab9dbc..3259a6bbaba3 100644 --- a/drivers/usb/musb/musb_core.h +++ b/drivers/usb/musb/musb_core.h | |||
@@ -311,6 +311,7 @@ struct musb_context_registers { | |||
311 | u8 index, testmode; | 311 | u8 index, testmode; |
312 | 312 | ||
313 | u8 devctl, busctl, misc; | 313 | u8 devctl, busctl, misc; |
314 | u32 otg_interfsel; | ||
314 | 315 | ||
315 | struct musb_csr_regs index_regs[MUSB_C_NUM_EPS]; | 316 | struct musb_csr_regs index_regs[MUSB_C_NUM_EPS]; |
316 | }; | 317 | }; |
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index ba85f273e487..78eb13a33796 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -491,6 +491,9 @@ static int omap2430_runtime_suspend(struct device *dev) | |||
491 | struct omap2430_glue *glue = dev_get_drvdata(dev); | 491 | struct omap2430_glue *glue = dev_get_drvdata(dev); |
492 | struct musb *musb = glue_to_musb(glue); | 492 | struct musb *musb = glue_to_musb(glue); |
493 | 493 | ||
494 | musb->context.otg_interfsel = musb_readl(musb->mregs, | ||
495 | OTG_INTERFSEL); | ||
496 | |||
494 | omap2430_low_level_exit(musb); | 497 | omap2430_low_level_exit(musb); |
495 | otg_set_suspend(musb->xceiv, 1); | 498 | otg_set_suspend(musb->xceiv, 1); |
496 | 499 | ||
@@ -503,6 +506,9 @@ static int omap2430_runtime_resume(struct device *dev) | |||
503 | struct musb *musb = glue_to_musb(glue); | 506 | struct musb *musb = glue_to_musb(glue); |
504 | 507 | ||
505 | omap2430_low_level_init(musb); | 508 | omap2430_low_level_init(musb); |
509 | musb_writel(musb->mregs, OTG_INTERFSEL, | ||
510 | musb->context.otg_interfsel); | ||
511 | |||
506 | otg_set_suspend(musb->xceiv, 0); | 512 | otg_set_suspend(musb->xceiv, 0); |
507 | 513 | ||
508 | return 0; | 514 | return 0; |