[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / psp / 0017-usb-musb-host-Flush-RxFIFO-only-when-RxPktRdy-is-set.patch
1 From c336629a155593e443ba21a0734b3c519a61e560 Mon Sep 17 00:00:00 2001
2 From: Ajay Kumar Gupta <ajay.gupta@ti.com>
3 Date: Thu, 24 May 2012 16:31:27 +0530
4 Subject: [PATCH 17/18] usb: musb: host: Flush RxFIFO only when RxPktRdy is
5 set
7 This need to be done as per mentor core documentations.
9 Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
10 ---
11 drivers/usb/musb/musb_host.c | 3 ++-
12 1 files changed, 2 insertions(+), 1 deletions(-)
14 diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
15 index 13520ee..f56fde2 100644
16 --- a/drivers/usb/musb/musb_host.c
17 +++ b/drivers/usb/musb/musb_host.c
18 @@ -507,7 +507,8 @@ static u16 musb_h_flush_rxfifo(struct musb_hw_ep *hw_ep, u16 csr)
19 * ignore dma (various models),
20 * leave toggle alone (may not have been saved yet)
21 */
22 - csr |= MUSB_RXCSR_FLUSHFIFO | MUSB_RXCSR_RXPKTRDY;
23 + if (csr & MUSB_RXCSR_RXPKTRDY)
24 + csr |= MUSB_RXCSR_FLUSHFIFO | MUSB_RXCSR_RXPKTRDY;
25 csr &= ~(MUSB_RXCSR_H_REQPKT
26 | MUSB_RXCSR_H_AUTOREQ
27 | MUSB_RXCSR_AUTOCLEAR);
28 --
29 1.7.7.6