Commit 1cb5e9ee authored by Yuan-Hsin Chen's avatar Yuan-Hsin Chen Committed by Felipe Balbi

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: default avatarYuan-Hsin Chen <yhchen@faraday-tech.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 9770a16f
...@@ -930,9 +930,12 @@ static void fusb300_wait_idma_finished(struct fusb300_ep *ep) ...@@ -930,9 +930,12 @@ static void fusb300_wait_idma_finished(struct fusb300_ep *ep)
fusb300_clear_int(ep->fusb300, FUSB300_OFFSET_IGR0, fusb300_clear_int(ep->fusb300, FUSB300_OFFSET_IGR0,
FUSB300_IGR0_EPn_PRD_INT(ep->epnum)); FUSB300_IGR0_EPn_PRD_INT(ep->epnum));
return;
IDMA_RESET: IDMA_RESET:
fusb300_clear_int(ep->fusb300, FUSB300_OFFSET_IGER0, reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_IGER0);
FUSB300_IGER0_EEPn_PRD_INT(ep->epnum)); 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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment