| From e5ec9c4d40d011885447f89d80214b2c72ae854d Mon Sep 17 00:00:00 2001 |
| From: Geert Uytterhoeven <geert+renesas@glider.be> |
| Date: Mon, 13 Feb 2017 12:00:26 +0100 |
| Subject: [PATCH 108/255] dmaengine: rcar-dmac: Widen DMA mask to 40 bits |
| |
| By default, the DMA mask covers only the low 32-bit address space, which |
| causes SWIOTLB on arm64 to fall back to a bounce buffer for DMA |
| transfers involving memory outside the 32-bit address space. |
| |
| The R-Car DMA controller hardware supports a 40-bit address space, hence |
| widen the DMA mask to 40 bits to actually make use of this feature. |
| |
| Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> |
| Signed-off-by: Vinod Koul <vinod.koul@intel.com> |
| (cherry picked from commit dc312349e87526dfe6387c1a82fafded706f0572) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/dma/sh/rcar-dmac.c | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| --- a/drivers/dma/sh/rcar-dmac.c |
| +++ b/drivers/dma/sh/rcar-dmac.c |
| @@ -1733,6 +1733,7 @@ static int rcar_dmac_probe(struct platfo |
| |
| dmac->dev = &pdev->dev; |
| platform_set_drvdata(pdev, dmac); |
| + dma_set_mask_and_coherent(dmac->dev, DMA_BIT_MASK(40)); |
| |
| ret = rcar_dmac_parse_of(&pdev->dev, dmac); |
| if (ret < 0) |