aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorAvinash Kumar <avinash.kumar@stericsson.com>2011-02-21 17:09:27 +0530
committerSrinidhi KASAGAR <srinidhi.kasagar@stericsson.com>2011-02-22 08:00:09 +0100
commitfd79c2404023f184f415b4be685627edbb693c74 (patch)
tree1306abeb7d9098f369b143fef3c540e009c13fba /drivers/usb
parented08186c43017d7603002c09f4e4dff7b6acfcda (diff)
ux500: musb: Fix for musb host receive in PIO mode
restore MUSB_RXCSR to original value when dma is not used. ST-Ericsson ID: ER 321774 Signed-off-by: Avinash Kumar <avinash.kumar@stericsson.com> Change-Id: I0f9ee62b1d645a21af5bfc254c16690a040adc77 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/16624 Reviewed-by: QATOOLS Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_host.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index fb63a33aa29..25cbeadb8b0 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -1505,6 +1505,9 @@ void musb_host_rx(struct musb *musb, u8 epnum)
u32 status;
struct dma_channel *dma;
+#if defined(CONFIG_USB_U8500_DMA)
+ u16 tmp_val;
+#endif
musb_ep_select(mbase, epnum);
urb = next_urb(qh);
@@ -1781,6 +1784,14 @@ void musb_host_rx(struct musb *musb, u8 epnum)
*/
val = musb_readw(epio, MUSB_RXCSR);
+
+#if defined(CONFIG_USB_U8500_DMA)
+ /* retain the original value,
+ *which will be used to reset CSR
+ */
+ tmp_val = val;
+#endif
+
val &= ~MUSB_RXCSR_H_REQPKT;
if (dma->desired_mode == 0)
@@ -1809,6 +1820,10 @@ void musb_host_rx(struct musb *musb, u8 epnum)
hw_ep->rx_channel = NULL;
dma = NULL;
/* REVISIT reset CSR */
+
+#if defined(CONFIG_USB_U8500_DMA)
+ musb_writew(epio, MUSB_RXCSR, tmp_val);
+#endif
}
}
#endif /* Mentor DMA || U8500 DMA */