[PATCH v4 04/13] spi: airoha: remove unnecessary switch to non-dma mode

Lorenzo Bianconi lorenzo at kernel.org
Sat Aug 23 01:29:26 PDT 2025


> The code switches to dma at the start of dirmap operation and returns
> to non-dma at the end of dirmap operation, so an additional switch to
> non-dma at the start of dirmap write is not required.

Acked-by: Lorenzo Bianconi <lorenzo at kernel.org>

> 
> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
> ---
>  drivers/spi/spi-airoha-snfi.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-airoha-snfi.c b/drivers/spi/spi-airoha-snfi.c
> index d64a687c07de..1ebf7def7ba7 100644
> --- a/drivers/spi/spi-airoha-snfi.c
> +++ b/drivers/spi/spi-airoha-snfi.c
> @@ -812,9 +812,6 @@ static ssize_t airoha_snand_dirmap_write(struct spi_mem_dirmap_desc *desc,
>  	int err;
>  
>  	as_ctrl = spi_controller_get_devdata(spi->controller);
> -	err = airoha_snand_set_mode(as_ctrl, SPI_MODE_MANUAL);
> -	if (err < 0)
> -		return err;
>  
>  	memcpy(txrx_buf + offs, buf, len);
>  	dma_addr = dma_map_single(as_ctrl->dev, txrx_buf, SPI_NAND_CACHE_SIZE,
> -- 
> 2.50.1
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250823/e7c0b8d9/attachment.sig>


More information about the linux-arm-kernel mailing list