projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ebf027
)
usb: gadget: mv_udc: optimize ep_enable
author
Troy Kisky
<
[email protected]
>
Thu, 10 Oct 2013 22:28:02 +0000
(15:28 -0700)
committer
Marek Vasut
<
[email protected]
>
Sun, 20 Oct 2013 21:46:33 +0000
(23:46 +0200)
Only get head if not ep0.
Signed-off-by: Troy Kisky <
[email protected]
>
drivers/usb/gadget/mv_udc.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/mv_udc.c
b/drivers/usb/gadget/mv_udc.c
index 1c5760535e37a42ceeaed80e4ccf3fd26daf3482..3f50c0f5f2a37b6fc0ae07265169cdba4585f7bf 100644
(file)
--- 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);
}