usb: Add U-Boot xhci driver
This adds the xhci driver from U-Boot-2020.04-rc2. The usual things like adjusting to the barebox driver model and using dev_* instead of printf/puts/debug messages are made. The previously existing PCI support is not present in this driver currently. XHCI PCI support was not enabled in any defconfig, so we boldly assume it was unused. It shouldn't be much effort though to add it again. The memory handling has been changed for barebox. The various descriptor rings and descriptors are allocated with dma_alloc_coherent() which makes the cache flushing/invalidating unnecessary. They are left in the driver in case we want to change that. The XHCI has a nasty limitation in that the TRBs may not cross a 64KiB boundary. This limitation has been handled in the U-Boot driver, but the handling seems to be broken. We help ourselves with using a bounce buffer which is sufficiently aligned, but this limits the maximum bulk transfer size to 64KiB. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
---|
|
drivers/usb/host/Kconfig |
---|
drivers/usb/host/Makefile |
---|
drivers/usb/host/xhci-mem.c 0 → 100644 |
---|
drivers/usb/host/xhci-ring.c 0 → 100644 |
---|
drivers/usb/host/xhci.c 0 → 100644 |
---|
Too large (Show diff)
|
drivers/usb/host/xhci.h 0 → 100644 |
---|
Too large (Show diff)
|
include/usb/xhci.h |
---|