[PATCH v4 1/1] mmc: use dmaengine_get_dma_device() instead of chan->device->dev

Frank Li Frank.li at oss.nxp.com
Wed Sep 23 12:33:35 PDT 2026


On Wed, Sep 23, 2026 at 08:57:04PM +0200, Arnd Bergmann wrote:
> On Wed, Sep 23, 2026, at 20:45, Frank.Li at oss.nxp.com wrote:
> > @@ -214,7 +214,7 @@ config MMC_SDHCI_OF_AT91
> >  config MMC_SDHCI_OF_ESDHC
> >  	tristate "SDHCI OF support for the Freescale eSDHC controller"
> >  	depends on MMC_SDHCI_PLTFM
> > -	depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE || COMPILE_TEST
> > +	depends on PPC || ARCHMXC || ARCH_LAYERSCAPE || COMPILE_TEST
> >  	select MMC_SDHCI_IO_ACCESSORS
> >  	select FSL_GUTS
>
> This looks like an accidental bug that should be removed from the patch.

It is accidently including my local change to build test. I found it when
post it.

>
> > @@ -961,7 +961,7 @@ static void atmci_dma_cleanup(struct atmel_mci *host)
> >  	struct mmc_data                 *data = host->data;
> >
> >  	if (data)
> > -		dma_unmap_sg(host->dma.chan->device->dev,
> > +		dma_unmap_sg(dmaengine_get_dma_device(host->dma.chan),
> >  				data->sg, data->sg_len,
> >  				mmc_get_dma_dir(data));
>
> Since you have the exact construct in a lot of drivers, would
> it make sense to take this one step further and introduce
> a new set of helpers in drivers/dma/dmaengine.h, such as
>
> unsigned int dmaengine_map_sg(struct dma_chan *chan, struct scatterlist *sg, ...);

If add this, suppose should be set of map_*, like dmaengine_map_single(),

Vinod:
	Is it add new APIs like thats?

Frank

>
>       Arnd



More information about the linux-arm-kernel mailing list