Skip to content

Commit

Permalink
usb: chipidea: udc: move ZLT flag change to ep_enable
Browse files Browse the repository at this point in the history
Its not necessary and also not specified in the datasheet to change the
ZLT flag before every ep_prime. This patch moves this to the ep_enable
and applies it only for non configuration endpoints.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Michael Grzeschik authored and Greg Kroah-Hartman committed Mar 30, 2013
1 parent 1cd12a9 commit 776ffc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/chipidea/udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq)
mEp->qh.ptr->td.next = cpu_to_le32(mReq->dma); /* TERMINATE = 0 */
mEp->qh.ptr->td.token &=
cpu_to_le32(~(TD_STATUS_HALTED|TD_STATUS_ACTIVE));
mEp->qh.ptr->cap |= cpu_to_le32(QH_ZLT);

wmb(); /* synchronize before ep prime */

Expand Down Expand Up @@ -1008,6 +1007,8 @@ static int ep_enable(struct usb_ep *ep,

if (mEp->type == USB_ENDPOINT_XFER_CONTROL)
cap |= QH_IOS;
if (mEp->num)
cap |= QH_ZLT;
cap |= (mEp->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT;

mEp->qh.ptr->cap = cpu_to_le32(cap);
Expand Down

0 comments on commit 776ffc1

Please sign in to comment.