* [PATCH 0/2] usb: musb: off mode fixes
@ 2011-09-07 0:49 Vikram Pandita
2011-09-07 0:49 ` [PATCH 1/2] usb: musb: omap2+: fix context api's Vikram Pandita
2011-09-07 0:49 ` [PATCH 2/2] usb: musb: omap2+: save and restore OTG_INTERFSEL Vikram Pandita
0 siblings, 2 replies; 5+ messages in thread
From: Vikram Pandita @ 2011-09-07 0:49 UTC (permalink / raw)
To: balbi; +Cc: linux-usb, linux-omap, Vikram Pandita
From: Vikram Pandita <vikram.pandita@ti.com>
Recent tests with OFF mode on OMAP44xx brings out these bugs
Hema HK (1):
usb: musb: omap2+: save and restore OTG_INTERFSEL
Vikram Pandita (1):
usb: musb: omap2+: fix context api's
drivers/usb/musb/musb_core.c | 4 ++--
drivers/usb/musb/musb_core.h | 1 +
drivers/usb/musb/omap2430.c | 6 ++++++
3 files changed, 9 insertions(+), 2 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] usb: musb: omap2+: fix context api's
2011-09-07 0:49 [PATCH 0/2] usb: musb: off mode fixes Vikram Pandita
@ 2011-09-07 0:49 ` Vikram Pandita
2011-09-07 0:49 ` [PATCH 2/2] usb: musb: omap2+: save and restore OTG_INTERFSEL Vikram Pandita
1 sibling, 0 replies; 5+ messages in thread
From: Vikram Pandita @ 2011-09-07 0:49 UTC (permalink / raw)
To: balbi; +Cc: linux-usb, linux-omap, Vikram Pandita, Anand Gadiyar
From: Vikram Pandita <vikram.pandita@ti.com>
RxFifoSz, TxFifoSz, RxFifoAddr, TxFifoAddr
are all indexed registers.
So before doing a context save or restore, INDEX register
should be set, then only one gets to the right register offset.
Change-Id: I33ab09f8c214457914ee848e097880c8800de9e6
Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
---
drivers/usb/musb/musb_core.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 20a2873..83facaf 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2158,7 +2158,7 @@ static void musb_save_context(struct musb *musb)
epio = hw_ep->regs;
if (!epio)
continue;
-
+ musb_writeb(musb_base, MUSB_INDEX, i);
musb->context.index_regs[i].txmaxp =
musb_readw(epio, MUSB_TXMAXP);
musb->context.index_regs[i].txcsr =
@@ -2233,7 +2233,7 @@ static void musb_restore_context(struct musb *musb)
epio = hw_ep->regs;
if (!epio)
continue;
-
+ musb_writeb(musb_base, MUSB_INDEX, i);
musb_writew(epio, MUSB_TXMAXP,
musb->context.index_regs[i].txmaxp);
musb_writew(epio, MUSB_TXCSR,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] usb: musb: omap2+: save and restore OTG_INTERFSEL
2011-09-07 0:49 [PATCH 0/2] usb: musb: off mode fixes Vikram Pandita
2011-09-07 0:49 ` [PATCH 1/2] usb: musb: omap2+: fix context api's Vikram Pandita
@ 2011-09-07 0:49 ` Vikram Pandita
[not found] ` <1315356573-1057-3-git-send-email-vikram.pandita-l0cyMroinI0@public.gmane.org>
1 sibling, 1 reply; 5+ messages in thread
From: Vikram Pandita @ 2011-09-07 0:49 UTC (permalink / raw)
To: balbi; +Cc: linux-usb, linux-omap, Hema HK, Kishon Vijay Abraham I
From: Hema HK <hemahk@ti.com>
we need to save and restore OTG_INTERFSEL register
else we will be unable to function on resume after
OFF mode.
Change-Id: I6c29c69596d5f47e00cf74ab0e32bb44ef71dda9
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>
---
drivers/usb/musb/musb_core.h | 1 +
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 b3c065a..3259a6b 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -311,6 +311,7 @@ struct musb_context_registers {
u8 index, testmode;
u8 devctl, busctl, misc;
+ u32 otg_interfsel;
struct musb_csr_regs index_regs[MUSB_C_NUM_EPS];
};
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index ba85f27..78eb13a 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;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] usb: musb: omap2+: save and restore OTG_INTERFSEL
[not found] ` <1315356573-1057-3-git-send-email-vikram.pandita-l0cyMroinI0@public.gmane.org>
@ 2011-09-07 10:52 ` Sergei Shtylyov
[not found] ` <4E674CD2.6050800-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-09-07 10:52 UTC (permalink / raw)
To: Vikram Pandita
Cc: balbi-l0cyMroinI0, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA, Hema HK,
Kishon Vijay Abraham I
Hello.
On 07-09-2011 4:49, Vikram Pandita wrote:
> From: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
> we need to save and restore OTG_INTERFSEL register
> else we will be unable to function on resume after
> OFF mode.
> Change-Id: I6c29c69596d5f47e00cf74ab0e32bb44ef71dda9
Remove this, please.
> Reported-by: Devaraj Rangasamy<dev-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Hema HK<hemahk-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Kishon Vijay Abraham I<kishon-l0cyMroinI0@public.gmane.org>
> ---
> drivers/usb/musb/musb_core.h | 1 +
> 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 b3c065a..3259a6b 100644
> --- a/drivers/usb/musb/musb_core.h
> +++ b/drivers/usb/musb/musb_core.h
> @@ -311,6 +311,7 @@ struct musb_context_registers {
> u8 index, testmode;
>
> u8 devctl, busctl, misc;
> + u32 otg_interfsel;
Shouldn't this be encosed in #ifdef?
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] usb: musb: omap2+: save and restore OTG_INTERFSEL
[not found] ` <4E674CD2.6050800-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
@ 2011-09-08 8:02 ` Felipe Balbi
0 siblings, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2011-09-08 8:02 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Vikram Pandita, balbi-l0cyMroinI0,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-omap-u79uwXL29TY76Z2rM5mHXA, Hema HK,
Kishon Vijay Abraham I
[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]
Hi,
On Wed, Sep 07, 2011 at 02:52:02PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 07-09-2011 4:49, Vikram Pandita wrote:
>
> >From: Hema HK <hemahk-l0cyMroinI0@public.gmane.org>
>
> >we need to save and restore OTG_INTERFSEL register
> >else we will be unable to function on resume after
> >OFF mode.
>
> >Change-Id: I6c29c69596d5f47e00cf74ab0e32bb44ef71dda9
>
> Remove this, please.
>
> >Reported-by: Devaraj Rangasamy<dev-l0cyMroinI0@public.gmane.org>
> >Signed-off-by: Hema HK<hemahk-l0cyMroinI0@public.gmane.org>
> >Signed-off-by: Kishon Vijay Abraham I<kishon-l0cyMroinI0@public.gmane.org>
> >---
> > drivers/usb/musb/musb_core.h | 1 +
> > 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 b3c065a..3259a6b 100644
> >--- a/drivers/usb/musb/musb_core.h
> >+++ b/drivers/usb/musb/musb_core.h
> >@@ -311,6 +311,7 @@ struct musb_context_registers {
> > u8 index, testmode;
> >
> > u8 devctl, busctl, misc;
> >+ u32 otg_interfsel;
>
> Shouldn't this be encosed in #ifdef?
Actually, this is part of the OMAP wrapper, so it would be better if you
would, instead, take care of this in omap2430.c.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-08 8:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-07 0:49 [PATCH 0/2] usb: musb: off mode fixes Vikram Pandita
2011-09-07 0:49 ` [PATCH 1/2] usb: musb: omap2+: fix context api's Vikram Pandita
2011-09-07 0:49 ` [PATCH 2/2] usb: musb: omap2+: save and restore OTG_INTERFSEL Vikram Pandita
[not found] ` <1315356573-1057-3-git-send-email-vikram.pandita-l0cyMroinI0@public.gmane.org>
2011-09-07 10:52 ` Sergei Shtylyov
[not found] ` <4E674CD2.6050800-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>
2011-09-08 8:02 ` Felipe Balbi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox