zephyr/drivers/usb/device
Declan Snyder 90570c6b9d drivers: usb_dc_mcux: Fix write performance issues
The MCUX USB device driver currently suffers from
some performance related issues caused by the removal
of the intermediate buffer in commit 4e6f80d37a.
This buffer was essential in the case when some USB
descriptors or data were in a slow access memory,
for example a flash memory accessed over flexspi.
USB DMA as AHB master would try to fetch the data,
but it would be too slow and USB peripheral
could not meet deadlines on the USB bus waiting for it,
and so it would send null packets instead causing errors.

This problem can be fixed by re-introducing an intermediate
buffer in RAM with the data copied from the slow memory by
the core before the USB transfer begins, so that USB DMA
is not responsible for fetching it from flexspi/flash.

Changes to MCUX USB Device Driver:
- Re-add intermediate buffer for USB writes in RAM
- Buffer is not needed for reads, add runtime check
  to avoid copy overhead
- Buffer is not needed for platforms with USB RAM,
  since the USB RAM itself acts as an intermediate buffer.
  Compile with buffer code only when USB RAM is not present on
  the platform, to avoid unecessary copy overhead.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-04-25 12:43:17 -05:00
..
CMakeLists.txt
Kconfig drivers: usb: Enable High speed Kconfig for NXP controllers 2023-01-23 19:40:44 -08:00
usb_dc_dw.c sys/util: extend usage of DIV_ROUND_UP 2023-04-12 16:42:29 +02:00
usb_dc_kinetis.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
usb_dc_mcux.c drivers: usb_dc_mcux: Fix write performance issues 2023-04-25 12:43:17 -05:00
usb_dc_native_posix_adapt.c
usb_dc_native_posix_adapt.h
usb_dc_native_posix.c drivers: usb_dc_native_posix: Allow endpoint disable after detach 2022-11-25 20:02:42 +01:00
usb_dc_nrfx.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
usb_dc_rpi_pico.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
usb_dc_sam0.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
usb_dc_sam_usbc.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
usb_dc_sam_usbhs.c treewide: Update clock control API usage 2023-04-05 10:55:46 +02:00
usb_dc_stm32.c treewide: Update clock control API usage 2023-04-05 10:55:46 +02:00
usb_dw_registers.h