[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240213170657.puwlx5pjl3odcs2k@runtux.com>
Date: Tue, 13 Feb 2024 18:06:57 +0100
From: Ralf Schlatterbeck <rsc@...tux.com>
To: Mark Brown <broonie@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>, linux-spi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] spi-mxs: Fix chipselect glitch
On Fri, Feb 02, 2024 at 12:53:30PM +0100, Ralf Schlatterbeck wrote:
> There was a change in the mxs-dma engine that uses a new custom flag.
> The change was not applied to the mxs spi driver.
> This results in chipselect being deasserted too early.
> This fixes the chipselect problem by using the new flag in the mxs-spi
> driver.
>
> Fixes: ceeeb99cd821 ("dmaengine: mxs: rename custom flag")
> Signed-off-by: Ralf Schlatterbeck <rsc@...tux.com>
> ---
> For oscilloscope screenshots and a verbose explanation see my blog post
> at https://blog.runtux.com/posts/2024/02/01/
> History:
> Omit the line break change from patch requested by Marc Kleine-Budde
> <mkl@...gutronix.de>
>
> drivers/spi/spi-mxs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
> index 1bf080339b5a..88cbe4f00cc3 100644
> --- a/drivers/spi/spi-mxs.c
> +++ b/drivers/spi/spi-mxs.c
> @@ -39,6 +39,7 @@
> #include <linux/spi/spi.h>
> #include <linux/spi/mxs-spi.h>
> #include <trace/events/spi.h>
> +#include <linux/dma/mxs-dma.h>
>
> #define DRIVER_NAME "mxs-spi"
>
> @@ -252,7 +253,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi,
> desc = dmaengine_prep_slave_sg(ssp->dmach,
> &dma_xfer[sg_count].sg, 1,
> (flags & TXRX_WRITE) ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM,
> - DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
> + DMA_PREP_INTERRUPT | MXS_DMA_CTRL_WAIT4END);
>
> if (!desc) {
> dev_err(ssp->dev,
> --
> 2.20.1
>
> --
> Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16
> Open Source Consulting www: www.runtux.com
> Reichergasse 131, A-3411 Weidling email: office@...tux.com
Any news on this, will it be picked up for the next merge window?
Thanks + kind regards
Ralf Schlatterbeck
--
Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16
Open Source Consulting www: www.runtux.com
Reichergasse 131, A-3411 Weidling email: office@...tux.com
Powered by blists - more mailing lists