Skip to content

Commit

Permalink
drivers: spi: mcux_flexcomm: fix invalid dma config for last tx packets.
Browse files Browse the repository at this point in the history
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 79a2e24)

Original-Signed-off-by: Johan Carlsson <johan.carlsson@teenage.engineering>
GitOrigin-RevId: 79a2e24
Change-Id: I78227abb37328ce00b13a96e486a8b2dcf6e6e0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5666211
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Tested-by: Ting Shen <phoenixshen@chromium.org>
  • Loading branch information
Johan Carlsson authored and Chromeos LUCI committed Jun 28, 2024
1 parent bdb2b96 commit 5652ea6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/spi/spi_mcux_flexcomm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ?
Expand Down Expand Up @@ -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) ?
Expand Down

0 comments on commit 5652ea6

Please sign in to comment.