diff options
author | Troy Kisky <troy.kisky@boundarydevices.com> | 2013-10-10 15:28:02 -0700 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2013-10-20 23:46:33 +0200 |
commit | 7b7924cdf8134b347e9e58aee0c595fb7ed45044 (patch) | |
tree | a153459e7c6026475b48f62d8ce7bd6772e48961 /drivers/usb | |
parent | 1ebf02787a1621143ecde48db86459067f9544e5 (diff) | |
download | u-boot-imx-7b7924cdf8134b347e9e58aee0c595fb7ed45044.zip u-boot-imx-7b7924cdf8134b347e9e58aee0c595fb7ed45044.tar.gz u-boot-imx-7b7924cdf8134b347e9e58aee0c595fb7ed45044.tar.bz2 |
usb: gadget: mv_udc: optimize ep_enable
Only get head if not ep0.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/mv_udc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c index 1c57605..3f50c0f 100644 --- a/drivers/usb/gadget/mv_udc.c +++ b/drivers/usb/gadget/mv_udc.c @@ -210,10 +210,8 @@ static void mv_ep_free_request(struct usb_ep *ep, struct usb_request *_req) static void ep_enable(int num, int in, int maxpacket) { - struct ept_queue_head *head; struct mv_udc *udc = (struct mv_udc *)controller.ctrl->hcor; unsigned n; - head = mv_get_qh(num, in); n = readl(&udc->epctrl[num]); if (in) @@ -222,6 +220,8 @@ static void ep_enable(int num, int in, int maxpacket) n |= (CTRL_RXE | CTRL_RXR | CTRL_RXT_BULK); if (num != 0) { + struct ept_queue_head *head = mv_get_qh(num, in); + head->config = CONFIG_MAX_PKT(maxpacket) | CONFIG_ZLT; mv_flush_qh(num); } |