diff options
author | Thirupathi Chippakurthy <thirupathi.chippakurthy@stericsson.com> | 2011-09-20 16:45:02 +0530 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:03:09 +0200 |
commit | 4d83f7fe5865287fd6b30851262bec9e9b6f05ae (patch) | |
tree | 768221cb2e89fd0299fd9d26d226a3d26d2725a0 | |
parent | e04da78768ed245061cbc75ffdc77500e0f4efe9 (diff) |
musb:host: Fix for musb host receive in PIO mode
restore MUSB_RXCSR to original value when dma is not used.
ST-Ericsson ID: ER 321774
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ia375a5a8da423bafae107248a4ea25158bce4793
Signed-off-by: <thirupathi.chippakurthy@stericsson.com>
Signed-off-by: Avinash Kumar <avinash.kumar@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31466
Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com>
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
-rw-r--r-- | drivers/usb/musb/musb_host.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 9a3d2bc0439..fa9239f9ed7 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -1451,7 +1451,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) size_t xfer_len; void __iomem *mbase = musb->mregs; int pipe; - u16 rx_csr, val; + u16 rx_csr, val, restore_csr; bool iso_err = false; bool done = false; u32 status; @@ -1733,6 +1733,11 @@ void musb_host_rx(struct musb *musb, u8 epnum) */ val = musb_readw(epio, MUSB_RXCSR); + + /* retain the original value, + * which will be used to reset CSR + */ + restore_csr = val; val &= ~MUSB_RXCSR_H_REQPKT; if (dma->desired_mode == 0) @@ -1761,6 +1766,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) hw_ep->rx_channel = NULL; dma = NULL; } + musb_writew(epio, MUSB_RXCSR, restore_csr); } #endif /* Mentor DMA */ |