From 5652ea617b76ae4631ecb065e0c4831e55d2b92e Mon Sep 17 00:00:00 2001 From: Johan Carlsson Date: Tue, 4 Jun 2024 13:17:29 +0200 Subject: [PATCH] drivers: spi: mcux_flexcomm: fix invalid dma config for last tx packets. fixes an incorrect dma configuration. When lpc dma driver was extended with gather/scatter support the spi dma driver stopped working. (cherry picked from commit 79a2e2445d1988f460e2cbcb9cc67003e3eacab6) Original-Signed-off-by: Johan Carlsson GitOrigin-RevId: 79a2e2445d1988f460e2cbcb9cc67003e3eacab6 Change-Id: I78227abb37328ce00b13a96e486a8b2dcf6e6e0f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5666211 Reviewed-by: Ting Shen Commit-Queue: Ting Shen Tested-by: ChromeOS Prod (Robot) Tested-by: Ting Shen --- drivers/spi/spi_mcux_flexcomm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/spi_mcux_flexcomm.c b/drivers/spi/spi_mcux_flexcomm.c index d374d3a5b81..1eccd380cef 100644 --- a/drivers/spi/spi_mcux_flexcomm.c +++ b/drivers/spi/spi_mcux_flexcomm.c @@ -400,7 +400,6 @@ static int spi_mcux_dma_tx_load(const struct device *dev, const uint8_t *buf, if (last_packet && ((word_size > 8) ? (len > 2U) : (len > 1U))) { spi_mcux_prepare_txdummy(&data->last_word, last_packet, spi_cfg); - blk_cfg->source_gather_en = 1; blk_cfg->source_address = (uint32_t)&data->dummy_tx_buffer; blk_cfg->dest_address = (uint32_t)&base->FIFOWR; blk_cfg->block_size = (word_size > 8) ? @@ -434,7 +433,6 @@ static int spi_mcux_dma_tx_load(const struct device *dev, const uint8_t *buf, */ if (last_packet && ((word_size > 8) ? (len > 2U) : (len > 1U))) { - blk_cfg->source_gather_en = 1; blk_cfg->source_address = (uint32_t)buf; blk_cfg->dest_address = (uint32_t)&base->FIFOWR; blk_cfg->block_size = (word_size > 8) ?