]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: Rework per message DMA mapped flag to be per transfer
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 31 May 2024 19:42:40 +0000 (22:42 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 10 Jun 2024 11:49:03 +0000 (12:49 +0100)
commite289df82344fecc104ad8326b9ab6da612b9c899
tree97397e61d210a3eff87984a7d8168c6cc7f55711
parentbd1886661b14345ed3c7b261550bcca6cd76840a
spi: Rework per message DMA mapped flag to be per transfer

The granularity of DMA mappings is transfer and moreover,
the direction is also important as it can be unidirect.

The current cur_msg_mapped flag doesn't fit well the DMA mapping
and syncing calls and we have tons of checks around on top of it.
So, instead of doing that rework the code to use per transfer per
direction flag to show if it's DMA mapped or not.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-QRD
Link: https://lore.kernel.org/r/20240531194723.1761567-9-andriy.shevchenko@linux.intel.com
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Tested-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/internals.h
drivers/spi/spi.c
include/linux/spi/spi.h