[PATCH] ARM: add PrimeCell generic DMA to MMCI/PL180
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Dec 21 08:54:21 EST 2010
On Sun, Dec 19, 2010 at 07:59:59PM +0000, Russell King - ARM Linux wrote:
> +static void mmci_dma_data_end(struct mmci_host *host)
> +{
> + struct mmc_data *data = host->data;
> +
> + dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len,
Note that when using a separate DMA agent to the targetted device, the
struct device appropriate for performing the mapping is the DMA agent
itself, not the targetted device.
That's because the memory which is addressible by DMA is determined by
the DMA agent rather than the device. It's much the same idea as a USB
bus device submitting buffers needs to map them using the USB _host_
device, rather than its own struct device.
IOW, dma_chan->device->dev, not mmc_dev(host->mmc).
Same goes for other primecell drivers. I'll update this patch later today
for that.
More information about the linux-arm-kernel
mailing list