summaryrefslogtreecommitdiff
path: root/rust/helpers/processor.c
diff options
context:
space:
mode:
authorJames Clark <james.clark@linaro.org>2025-09-02 13:44:58 +0100
committerMark Brown <broonie@kernel.org>2025-09-03 14:30:33 +0100
commit7d9baf1e530930e28b45805e3855a4a465a9e36e (patch)
tree3701cf9a406a2e0e7d3f740bbfa83ef91d9d1c88 /rust/helpers/processor.c
parentfbb618e11fa7976c5295facb28afbf1a08393f51 (diff)
spi: spi-fsl-dspi: Increase target mode DMA buffer size
When the device is configured as a target, the host won't stop sending data while we're draining the buffer which leads to FIFO underflows and corruption. Increase the DMA buffer size to the maximum words that edma can transfer once to reduce the chance of this happening. In host mode, the driver is able to split up a transfer into smaller chunks so we don't need to increase the size. While in target mode, the length of the transfer is determined by the remote host and can be larger than whatever default buffer size we pick. Keeping the buffer small in host mode avoids wasting memory, but allocating the largest possible in target mode gives the lowest possible chance of dropping any data from the host. While we could allocate per-transfer using the exact size of the transfer, 128K is quite a large allocation and there is a chance it could fail due to memory fragmentation unless it's allocated once at init time. Signed-off-by: Larisa Grigore <larisa.grigore@nxp.com> Signed-off-by: James Clark <james.clark@linaro.org> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Message-ID: <20250902-james-nxp-spi-dma-v6-6-f7aa2c5e56e2@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'rust/helpers/processor.c')
0 files changed, 0 insertions, 0 deletions