diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-09-18 06:40:50 -0700 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2017-10-01 16:32:55 +0200 |
commit | fae35857e1c38776854442f59d6b56c17e93fc39 (patch) | |
tree | f0933df6d43620dff9251ce337ba7140cf5c1d6e /drivers/usb/host/xhci-mem.c | |
parent | ab2b727dc03113fe35d6a9c937911055be3d3990 (diff) | |
download | u-boot-fae35857e1c38776854442f59d6b56c17e93fc39.tar.gz |
usb: xhci: Set 'Average TRB Length' to 8 for control endpoints
Update the codes to conform with xHCI spec chapter 6.2.3.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/usb/host/xhci-mem.c')
-rw-r--r-- | drivers/usb/host/xhci-mem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 84982a92d6..0582a9be40 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -850,6 +850,12 @@ void xhci_setup_addressable_virt_dev(struct xhci_ctrl *ctrl, trb_64 = (uintptr_t)virt_dev->eps[0].ring->first_seg->trbs; ep0_ctx->deq = cpu_to_le64(trb_64 | virt_dev->eps[0].ring->cycle_state); + /* + * xHCI spec 6.2.3: + * software shall set 'Average TRB Length' to 8 for control endpoints. + */ + ep0_ctx->tx_info = cpu_to_le32(EP_AVG_TRB_LENGTH(8)); + /* Steps 7 and 8 were done in xhci_alloc_virt_device() */ xhci_flush_cache((uintptr_t)ep0_ctx, sizeof(struct xhci_ep_ctx)); |