diff options
author | Vikram Pandita <vikram.pandita@ti.com> | 2011-09-07 12:19:23 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 04:51:40 -0500 |
commit | ea737554451d9fae1207e84a3d2c495bbfcd3f08 (patch) | |
tree | a1e7c3ebca4e5bb398616822b3fc3c07d5ae82a8 /drivers/usb/musb | |
parent | be18a251892ab85d1bc10d87d336ee25f8dba615 (diff) |
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: Vikram Pandita <vikram.pandita@ti.com>
Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | 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 b63ab1570103..2141976d423c 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -2158,6 +2158,7 @@ static void musb_save_context(struct musb *musb) | |||
2158 | if (!epio) | 2158 | if (!epio) |
2159 | continue; | 2159 | continue; |
2160 | 2160 | ||
2161 | musb_writeb(musb_base, MUSB_INDEX, i); | ||
2161 | musb->context.index_regs[i].txmaxp = | 2162 | musb->context.index_regs[i].txmaxp = |
2162 | musb_readw(epio, MUSB_TXMAXP); | 2163 | musb_readw(epio, MUSB_TXMAXP); |
2163 | musb->context.index_regs[i].txcsr = | 2164 | musb->context.index_regs[i].txcsr = |
@@ -2233,6 +2234,7 @@ static void musb_restore_context(struct musb *musb) | |||
2233 | if (!epio) | 2234 | if (!epio) |
2234 | continue; | 2235 | continue; |
2235 | 2236 | ||
2237 | musb_writeb(musb_base, MUSB_INDEX, i); | ||
2236 | musb_writew(epio, MUSB_TXMAXP, | 2238 | musb_writew(epio, MUSB_TXMAXP, |
2237 | musb->context.index_regs[i].txmaxp); | 2239 | musb->context.index_regs[i].txmaxp); |
2238 | musb_writew(epio, MUSB_TXCSR, | 2240 | musb_writew(epio, MUSB_TXCSR, |