提交 ea737554 编写于 作者: V Vikram Pandita 提交者: Felipe Balbi

usb: musb: omap2+: fix context api's

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: NVikram Pandita <vikram.pandita@ti.com>
Signed-off-by: NAnand Gadiyar <gadiyar@ti.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 be18a251
......@@ -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 =
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册