usb: gadget: mv_udc: init next dtd ptr for dqh when init ep0

Set next dtd ptr to EP_QUEUE_HEAD_NEXT_TERMINATE for dqh when init ep0.
It means the dQH is empty.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Neil Zhang 2011-10-12 16:49:29 +08:00 committed by Felipe Balbi
parent 43ad9f3fae
commit fbebe1f070

View File

@ -96,6 +96,8 @@ static void ep0_reset(struct mv_udc *udc)
(EP0_MAX_PKT_SIZE << EP_QUEUE_HEAD_MAX_PKT_LEN_POS)
| EP_QUEUE_HEAD_IOS;
ep->dqh->next_dtd_ptr = EP_QUEUE_HEAD_NEXT_TERMINATE;
epctrlx = readl(&udc->op_regs->epctrlx[0]);
if (i) { /* TX */
epctrlx |= EPCTRL_TX_ENABLE