summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirupathi Chippakurthy <thirupathi.chippakurthy@stericsson.com>2011-09-20 16:45:02 +0530
committerSrinidhi KASAGAR <srinidhi.kasagar@stericsson.com>2011-09-20 14:47:52 +0200
commit32e9fac45f48ca3263a2b052b837f1f30c2d039e (patch)
treecdc0fb9d251f0ad690d7b7a24ef8e58a00bc513c
parenteb29b33dac130da396e535b5eb5facc1792e1d45 (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.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index cfe315a9581..2582389881d 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -1447,7 +1447,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;
@@ -1729,6 +1729,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)
@@ -1757,6 +1762,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 */