[v2 1/2] usb: musb: omap2+: fix context api's
From: Vikram Pandita 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. Signed-off-by: Vikram Pandita Signed-off-by: Anand Gadiyar --- drivers/usb/musb/musb_core.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 20a2873..6328aaf 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2159,6 +2159,7 @@ static void musb_save_context(struct musb *musb) 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 = @@ -2234,6 +2235,7 @@ static void musb_restore_context(struct musb *musb) 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 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [v2 1/2] usb: musb: omap2+: fix context api's
On Wed, Sep 07, 2011 at 09:19:23AM -0700, Vikram Pandita wrote: > From: Vikram Pandita > > 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. > > Signed-off-by: Vikram Pandita > Signed-off-by: Anand Gadiyar applied, thanks (sorry for the long delay) -- balbi signature.asc Description: Digital signature
Re: [v2 1/2] usb: musb: omap2+: fix context api's
On Sun, Oct 9, 2011 at 11:08 PM, Felipe Balbi wrote: > On Wed, Sep 07, 2011 at 09:19:23AM -0700, Vikram Pandita wrote: >> From: Vikram Pandita >> >> 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. >> >> Signed-off-by: Vikram Pandita >> Signed-off-by: Anand Gadiyar > > applied, thanks thanks. > > (sorry for the long delay) Late is better than never :-) > > -- > balbi > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html