mmc: bcm2835: DMA mapping improvements

As pointed out by sashiko bot in [0], recent proposed changes to
dma_max_mapping_size() may affect the driver.

While the issue reported may be a false positive, Robin pointed out some
other DMA-related issues in the driver which are addressed here:
- the DMA max mapping size is irrelevant for the programmed IO mode of
  operation
- we should not call dma_max_mapping_size() on the MMC host platform
  device, but rather the DMA engine device

In addition, it's better to use the device returned from
dmaengine_get_dma_device() for dma_umap_sg() and dma_unmap_sg(), and not
reference the DMA channel device directly.

[0] https://lore.kernel.org/linux-scsi/d82926fe-4557-401d-ae58-4302fef5657c@oracle.com/#t

Signed-off-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
This commit is contained in:
John Garry 2026-07-14 08:44:56 +00:00 • committed by Ulf Hansson
commit 5608386899