diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2013-03-30 06:54:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-30 11:20:48 -0400 |
commit | 776ffc16b74a5c19285135cfbc6dd02e1c733f25 (patch) | |
tree | b756801989adaa5636b7a7e8bef0935555d6b085 | |
parent | 1cd12a9cf055e72b3094ef38ac4d9afff2e9520e (diff) |
usb: chipidea: udc: move ZLT flag change to ep_enable
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>
-rw-r--r-- | drivers/usb/chipidea/udc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 3abd1ad5ced1..94af0208dab8 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -463,7 +463,6 @@ static int _hardware_enqueue(struct ci13xxx_ep *mEp, struct ci13xxx_req *mReq) | |||
463 | mEp->qh.ptr->td.next = cpu_to_le32(mReq->dma); /* TERMINATE = 0 */ | 463 | mEp->qh.ptr->td.next = cpu_to_le32(mReq->dma); /* TERMINATE = 0 */ |
464 | mEp->qh.ptr->td.token &= | 464 | mEp->qh.ptr->td.token &= |
465 | cpu_to_le32(~(TD_STATUS_HALTED|TD_STATUS_ACTIVE)); | 465 | cpu_to_le32(~(TD_STATUS_HALTED|TD_STATUS_ACTIVE)); |
466 | mEp->qh.ptr->cap |= cpu_to_le32(QH_ZLT); | ||
467 | 466 | ||
468 | wmb(); /* synchronize before ep prime */ | 467 | wmb(); /* synchronize before ep prime */ |
469 | 468 | ||
@@ -1008,6 +1007,8 @@ static int ep_enable(struct usb_ep *ep, | |||
1008 | 1007 | ||
1009 | if (mEp->type == USB_ENDPOINT_XFER_CONTROL) | 1008 | if (mEp->type == USB_ENDPOINT_XFER_CONTROL) |
1010 | cap |= QH_IOS; | 1009 | cap |= QH_IOS; |
1010 | if (mEp->num) | ||
1011 | cap |= QH_ZLT; | ||
1011 | cap |= (mEp->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT; | 1012 | cap |= (mEp->ep.maxpacket << __ffs(QH_MAX_PKT)) & QH_MAX_PKT; |
1012 | 1013 | ||
1013 | mEp->qh.ptr->cap = cpu_to_le32(cap); | 1014 | mEp->qh.ptr->cap = cpu_to_le32(cap); |