Instead of waiting forever and potentially allowing infinite loop on
ISR, wait some arbitrary amount of cycles to error out if it isn't
happening. Still make this configurable for debugging purposes.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Since these drivers mainly do not use MCUX except for the configure
function (which will soon also be changed), change namespace prefix to
lpspi_ instead of spi_mcux_ to avoid confusion.
Also improve descriptions of kconfigs to clarify what they are for.
Not changing the kconfig names for now since they are user-facing.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Fix the ASYNC DMA API on the lpspi driver and actually make the entire
driver go through that path. Rather than having an orthogonal
internally synchronous path we can just have both APIs go through the
same asynchronous path and just use wait_for_completion from spi context
to implement either sync or async.
Also make DMA driver default y if dependency (an lpspi having dmas
property) is met.
And lpspi_wait_tx_fifo_empty can be shared between drivers.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The Kconfig description is wrong, this driver can be used with or
without RTIO. Also, rename the kconfig to be less confusing, as _NORMAL
is meaningless, this is the CPU/interrupt based driver.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
For the CPU-based drivers, delete the old MCUX based RTIO driver and use
the default RTIO submit implementation instead.
Rationale:
- 300 LOC -> 1 LOC to maintain.
- MCUX SDK based driver cannot control the chip select for the transfer
properly, but the new spi_nxp_lpspi.c driver can. So this fixes the
bug with the PCS when using RTIO.
Also enable the default RTIO implementation for DMA based driver.
In the future a DMA based RTIO driver with custom implementation can be
designed, but for CPU based transfer, which is already not optimal
performance, code maintenance is more important. Only requirement is
asynchronous submit, which is accomplished by p4wq in rtio workq.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
The DMA-based path of the lpspi driver is basically
almost a driver of it's own, move it to it's own file.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
There is (almost) a whole separate driver for RTIO,
move this code to its own file and move shared code
and definitions to a common file.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Move this driver to its own subfolder to organize it
since there will be new files added for this hardware.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-01-14 15:39:04 +01:00
Renamed from drivers/spi/Kconfig.mcux_lpspi (Browse further)