u-boot/drivers/usb/host
Chunfeng Yun e3ea481bee usb: xhci: create one unified function to calculate TRB TD remainder
xhci versions 1.0 and later report the untransferred data remaining in a
TD a bit differently than older hosts.

We used to have separate functions for these, and needed to check host
version before calling the right function.

Now Mediatek host has an additional quirk on how it uses the TD Size
field for remaining data. To prevent yet another function for calculating
remainder we instead want to make one quirk friendly unified function.

Porting from the Linux:
c840d6ce772d("xhci: create one unified function to calculate TRB TD remainder.")
124c39371114("xhci: use boolean to indicate last trb in td remainder calculation")

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-10-01 19:43:05 +02:00
..
dwc2.c usb: dwc2: Fix not calling dev_xxx with a device 2020-09-30 08:53:52 -04:00
dwc2.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dwc3-of-simple.c usb: dwc3-of-simple: Drop redundant inclding header file 2020-04-13 13:48:30 +02:00
dwc3-sti-glue.c usb: host: dwc3-sti-glue: Fix ofnode_valid() parameter 2020-08-13 09:19:18 +02:00
ehci-armada100.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ehci-atmel.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
ehci-exynos.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
ehci-faraday.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-fsl.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
ehci-generic.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ehci-hcd.c usb: host: ehci-hcd: change trace level for phy errors managed by uclass 2020-09-08 08:46:32 -04:00
ehci-marvell.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
ehci-msm.c usb: ehci-msm: Use dev interface to get device address 2020-03-30 03:48:53 +02:00
ehci-mx5.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ehci-mx6.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ehci-mxc.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-mxs.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-omap.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ehci-pci.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ehci-rmobile.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-spear.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-tegra.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ehci-vct.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ehci-vf.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ehci-zynq.c treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr() 2020-08-22 08:53:37 -06:00
ehci.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
Kconfig xilinx: kconfig: Change Kconfig dependencies for Xilinx drivers 2020-09-23 10:31:40 +02:00
Makefile driver: usb: drop legacy rockchip xhci driver 2020-05-30 07:38:50 +08:00
ohci-at91.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ohci-da8xx.c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ohci-ep93xx.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ohci-generic.c usb: host: ohci: change trace level for phy errors managed by uclass 2020-09-08 08:46:32 -04:00
ohci-hcd.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
ohci-lpc32xx.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ohci-pci.c usb, ohci, pci: add DM support for PCI-based OHCI USB controller 2019-08-08 11:35:02 +02:00
ohci.h usb: ohci: Add header file for ARCH_DMA_MINALIGN 2020-06-02 13:06:10 -04:00
r8a66597-hcd.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
r8a66597.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
sl811-hcd.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
sl811.h drivers/usb: regorganisation 2009-04-06 20:40:46 +02:00
usb-sandbox.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
usb-uclass.c usb: ci_udc: Add function to remove usb device 2020-09-01 14:47:43 +02:00
utmi-armada100.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
xhci-brcm.c drivers: usb: host: Add BRCM xHCI driver 2020-04-13 13:48:41 +02:00
xhci-dwc3.c usb: dwc3: fix NULL pointer issue 2020-05-22 15:22:36 +02:00
xhci-exynos5.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
xhci-fsl.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
xhci-mem.c usb: xhci: Add virt_to_phys() to support mapped platforms 2020-08-05 09:30:46 +02:00
xhci-mtk.c xhci: mediatek: Add support for MTK xHCI host controller 2020-05-02 12:32:28 +02:00
xhci-mvebu.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
xhci-omap.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
xhci-pci.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
xhci-rcar-r8a779x_usb3_v3.h usb: xhci: Add Renesas R-Car xHCI driver 2017-11-26 02:22:36 +01:00
xhci-rcar.c treewide: convert devfdt_get_addr() to dev_read_addr() 2020-07-25 14:46:57 -06:00
xhci-ring.c usb: xhci: create one unified function to calculate TRB TD remainder 2020-10-01 19:43:05 +02:00
xhci.c usb: xhci: add a member hci_version in xhci_ctrl struct 2020-10-01 19:43:05 +02:00