summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorYuan-Hsin Chen2013-04-02 13:18:08 +0200
committerFelipe Balbi2013-04-02 15:58:39 +0200
commit1cb5e9ee033f89d3241013cfff8300cc0195a62d (patch)
tree286d5813d94e5f33d097f7f826357efde70b76df /drivers/usb/gadget
parentusb: gadget: fusb300_udc: add FUSB300_EPSET0_STL_CLR for clearing EP0 stall (diff)
downloadkernel-qcow2-linux-1cb5e9ee033f89d3241013cfff8300cc0195a62d.tar.gz
kernel-qcow2-linux-1cb5e9ee033f89d3241013cfff8300cc0195a62d.tar.xz
kernel-qcow2-linux-1cb5e9ee033f89d3241013cfff8300cc0195a62d.zip
usb: gadget: fusb300_udc: bug fix of not doing idma reset for each time
Enter IDMA_RESET only when the controller has been reset or the device has been plugged in to or out from a host. In IDMA_RESET, we should disable the corresponding PRD interrupt. Also there is a redundant space eliminated. fusb300_udc driver is tested on FARADAY platform a369 with FUSB300 FPGA v1.8 Signed-off-by: Yuan-Hsin Chen <yhchen@faraday-tech.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/fusb300_udc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/gadget/fusb300_udc.c b/drivers/usb/gadget/fusb300_udc.c
index db0d2917987a..cec8871b77f9 100644
--- a/drivers/usb/gadget/fusb300_udc.c
+++ b/drivers/usb/gadget/fusb300_udc.c
@@ -930,12 +930,15 @@ static void fusb300_wait_idma_finished(struct fusb300_ep *ep)
fusb300_clear_int(ep->fusb300, FUSB300_OFFSET_IGR0,
FUSB300_IGR0_EPn_PRD_INT(ep->epnum));
+ return;
+
IDMA_RESET:
- fusb300_clear_int(ep->fusb300, FUSB300_OFFSET_IGER0,
- FUSB300_IGER0_EEPn_PRD_INT(ep->epnum));
+ reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_IGER0);
+ reg &= ~FUSB300_IGER0_EEPn_PRD_INT(ep->epnum);
+ iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_IGER0);
}
-static void fusb300_set_idma(struct fusb300_ep *ep,
+static void fusb300_set_idma(struct fusb300_ep *ep,
struct fusb300_request *req)
{
int ret;