From patchwork Wed Mar 8 11:02:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 9610957 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 BF6AA60414 for ; Wed, 8 Mar 2017 12:15:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD80428532 for ; Wed, 8 Mar 2017 12:15:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A253528576; Wed, 8 Mar 2017 12:15:19 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable 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 4F52328532 for ; Wed, 8 Mar 2017 12:15:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751527AbdCHMPF (ORCPT ); Wed, 8 Mar 2017 07:15:05 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35384 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752982AbdCHMPD (ORCPT ); Wed, 8 Mar 2017 07:15:03 -0500 Received: by mail-pg0-f66.google.com with SMTP id 187so3296193pgb.2; Wed, 08 Mar 2017 04:14:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=Tj8zXdc4MSUncfGIVbg/gkGcnBlwLU8j+pVBe0M5z+s=; b=fmF8aBA+MI9HgbDPV4f5orCBv9COWocP1Jy6Mg9lICqKNrCwFB2yIyULG3bmnddJc1 GejfNDGwzl1kYhQH9D7PlDVsWwmqDRDFfWoiwKP4erSG8m87/A7C3FKKo0ZhTMIi26/g adPqtHZXVWzLdmmknQKXNsDC1cSsWS1+zngQtPIDiAyTmUqf3L5E88SOTViZzI0DCfZx ZsONocCci8st2KI3Gdn260mwnuW33fNlE8ZRUYZ5dHZVxB1i4StXRG5f9yn9Zo88IZ/9 uqHQMI91bm/K0s6M0FvljrO4XBYUeTj3IzcHPkoXpUaG7F+IzFgtQVyggpcWcOAbBTxg TuCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:date:message-id:in-reply-to :references:subject; bh=Tj8zXdc4MSUncfGIVbg/gkGcnBlwLU8j+pVBe0M5z+s=; b=NK5rTymkWm3EInAGjg7QcCJaEzTgs05DtRxkTlJcqCkMe43opBIruTycxQgnqPqXTg McVXSHEzsDruPMs8NnlmIiUdlFSYts7fCZeWf+9UcTLk7uz7KFAAilkcBfSBns8S9d9g qCzkuTvQqbPwG4ozzogQNqNV+JaCqZsq9Pu6FYmW06/LWSQrappsn3v+KccL/q5/4LZp Dv+a407vB1gDfMH8AyGP34Xn31KPI/RMfPPncD2FWoimh2GMXYL3cCKMmlHCjiLAJmgl 5qhAWcQ8KGXCUoJXZ57wXJBwUQ2bv/lz6BRc9Ree+ePuXHTVU2/4Uo4oNE8Io/45BvdY HN8g== X-Gm-Message-State: AMke39k8L8EXNRRlN0GdW4iR3HKEG9QRen5PiH+KtVb088+okBhkcdcDOikjIeZFdwq6Cw== X-Received: by 10.99.199.69 with SMTP id v5mr6209846pgg.90.1488971275707; Wed, 08 Mar 2017 03:07:55 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id 74sm5583049pge.14.2017.03.08.03.07.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 03:07:53 -0800 (PST) From: Magnus Damm To: joro@8bytes.org Cc: laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, iommu@lists.linux-foundation.org, horms+renesas@verge.net.au, Magnus Damm , robin.murphy@arm.com, m.szyprowski@samsung.com Date: Wed, 08 Mar 2017 20:02:13 +0900 Message-Id: <148897093339.16106.5329228083105867675.sendpatchset@little-apple> In-Reply-To: <148897088333.16106.13237004440297956899.sendpatchset@little-apple> References: <148897088333.16106.13237004440297956899.sendpatchset@little-apple> Subject: [PATCH v3 05/09] iommu/ipmmu-vmsa: IPMMU device is 40-bit bus master 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 From: Magnus Damm The r8a7795 IPMMU supports 40-bit bus mastering. Both the coherent DMA mask and the streaming DMA mask are set to unlock the 40-bit address space for coherent allocations and streaming operations. Signed-off-by: Magnus Damm --- Changes since V2: - Updated the code and commit message to use 40 bits instead of 64 bits Changes since V1: - Updated the commit message drivers/iommu/ipmmu-vmsa.c | 1 + 1 file changed, 1 insertion(+) --- 0016/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2017-03-08 18:29:56.390607110 +0900 @@ -1103,6 +1103,7 @@ static int ipmmu_probe(struct platform_d spin_lock_init(&mmu->lock); bitmap_zero(mmu->ctx, IPMMU_CTX_MAX); mmu->features = match->data; + dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40)); /* Map I/O memory and request IRQ. */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);