[PATCH] mmc: sdhci-sirf: enable dmabounce since SiRFprimaII MMC DMA only access up to 256MB
Russell King - ARM Linux
linux at arm.linux.org.uk
Sun Oct 27 18:12:35 EDT 2013
On Mon, Oct 28, 2013 at 05:23:50AM +0800, Barry Song wrote:
> @@ -92,6 +103,13 @@ static int sdhci_sirf_probe(struct platform_device *pdev)
> }
> }
>
> + if (of_machine_is_compatible("sirf,prima2")) {
> + if (pdev->dev.dma_mask)
> + *(pdev->dev.dma_mask) = SZ_256M - 1;
> + pdev->dev.coherent_dma_mask = SZ_256M - 1;
NAK. Please do not directly write to the DMA mask; this is not how DMA
masks should be setup. Please read up on the DMA API and specifically
in this case the dma_set_mask() / dma_set_coherent_mask() functions.
Also note that after the next merge window, those two calls should be
collapsed to dma_set_mask_and_coherent().
Thanks.
More information about the linux-arm-kernel
mailing list