summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
authorHema HK2011-09-07 18:19:24 +0200
committerFelipe Balbi2011-12-12 10:51:40 +0100
commite25bec160158abe86c276d7d206264afc3646281 (patch)
tree3d2286ff2932971b6950207fde1c8f522da2a46e /drivers/usb/musb/omap2430.c
parentusb: musb: omap2+: fix context api's (diff)
downloadkernel-qcow2-linux-e25bec160158abe86c276d7d206264afc3646281.tar.gz
kernel-qcow2-linux-e25bec160158abe86c276d7d206264afc3646281.tar.xz
kernel-qcow2-linux-e25bec160158abe86c276d7d206264afc3646281.zip
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/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c6
1 files changed, 6 insertions, 0 deletions
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)
struct omap2430_glue *glue = dev_get_drvdata(dev);
struct musb *musb = glue_to_musb(glue);
+ musb->context.otg_interfsel = musb_readl(musb->mregs,
+ OTG_INTERFSEL);
+
omap2430_low_level_exit(musb);
otg_set_suspend(musb->xceiv, 1);
@@ -503,6 +506,9 @@ static int omap2430_runtime_resume(struct device *dev)
struct musb *musb = glue_to_musb(glue);
omap2430_low_level_init(musb);
+ musb_writel(musb->mregs, OTG_INTERFSEL,
+ musb->context.otg_interfsel);
+
otg_set_suspend(musb->xceiv, 0);
return 0;