From d2ea9e48068f6c18f3b999dd3ecb1c2376fc7fc4 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Thu, 30 Nov 2023 11:35:11 +0100 Subject: [PATCH] drivers: serial: stm32wba: Suspension required before stop in DMA Tx abort In a previous change, STM32U5 GPDMA specific behavior was set into a specific configuration applying only to few devices impacted by a specific silicon erratum. As part of this change, dma suspension before dma stop was set to apply to the specific erratum workaround. It appears, this was wrong and dma suspension before dma stop should be done on all devices compatible with stm32u5 dma. This fix re-instantiate the correct behavior. Signed-off-by: Erwan Gouriou --- drivers/serial/uart_stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c index e36e13b3631..638343528fe 100644 --- a/drivers/serial/uart_stm32.c +++ b/drivers/serial/uart_stm32.c @@ -1633,7 +1633,7 @@ static int uart_stm32_async_tx_abort(const struct device *dev) data->dma_tx.counter = tx_buffer_length - stat.pending_length; } -#ifdef CONFIG_UART_STM32U5_ERRATA_DMAT +#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32u5_dma) dma_suspend(data->dma_tx.dma_dev, data->dma_tx.dma_channel); #endif dma_stop(data->dma_tx.dma_dev, data->dma_tx.dma_channel);