zephyr/drivers/usb
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
..
bc12 emul: pi3usb9201: Create pi3usb9201 emulator 2023-03-30 17:34:36 -04:00
device drivers: usb_dc_mcux: Fix write performance issues 2023-04-25 12:43:17 -05:00
udc init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
uhc drivers: kconfig: unify menuconfig title strings 2023-03-28 15:06:06 +02:00
uvb init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
CMakeLists.txt bc12: API and 1st driver implementation. 2023-03-30 17:34:36 -04:00
Kconfig bc12: API and 1st driver implementation. 2023-03-30 17:34:36 -04:00