From patchwork Mon Oct 31 17:08:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9406075 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1280F60721 for ; Mon, 31 Oct 2016 17:09:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1F4A2934F for ; Mon, 31 Oct 2016 17:09:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E65DE2935C; Mon, 31 Oct 2016 17:09:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6475628DF6 for ; Mon, 31 Oct 2016 17:09:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944953AbcJaRIh (ORCPT ); Mon, 31 Oct 2016 13:08:37 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:57207 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S944931AbcJaRIY (ORCPT ); Mon, 31 Oct 2016 13:08:24 -0400 Received: from ayla.of.borg ([84.193.137.253]) by andre.telenet-ops.be with bizsmtp id 2H8L1u00r5UCtCs01H8L5C; Mon, 31 Oct 2016 18:08:23 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1c1G4K-0005Sl-Ru; Mon, 31 Oct 2016 18:08:20 +0100 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1c1G4R-0003Va-E9; Mon, 31 Oct 2016 18:08:27 +0100 From: Geert Uytterhoeven To: Magnus Damm , Simon Horman , Laurent Pinchart , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Cc: linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH/RFC 5/5] dmaengine: rcar-dmac: Widen DMA mask to 40 bits Date: Mon, 31 Oct 2016 18:08:22 +0100 Message-Id: <1477933702-13423-6-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477933702-13423-1-git-send-email-geert+renesas@glider.be> References: <1477933702-13423-1-git-send-email-geert+renesas@glider.be> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/dma/sh/rcar-dmac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 2e441d0ccd79a37a..93a69b992a51a7aa 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -1716,6 +1716,7 @@ static int rcar_dmac_probe(struct platform_device *pdev) 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)