Skip to content

Commit

Permalink
usb: musb: omap2+: fix context api's
Browse files Browse the repository at this point in the history
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 <vikram.pandita@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Vikram Pandita authored and Felipe Balbi committed Dec 12, 2011
1 parent be18a25 commit ea73755
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,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 =
Expand Down Expand Up @@ -2233,6 +2234,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,
Expand Down

0 comments on commit ea73755

Please sign in to comment.