From patchwork Mon Jun 19 09:14:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 9795557 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 8B6A2600C5 for ; Mon, 19 Jun 2017 09:18:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A371283C0 for ; Mon, 19 Jun 2017 09:18:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F131283E7; Mon, 19 Jun 2017 09:18:33 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 25367283C0 for ; Mon, 19 Jun 2017 09:18:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753938AbdFSJSc (ORCPT ); Mon, 19 Jun 2017 05:18:32 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33347 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753936AbdFSJSa (ORCPT ); Mon, 19 Jun 2017 05:18:30 -0400 Received: by mail-pf0-f195.google.com with SMTP id w12so15536118pfk.0; Mon, 19 Jun 2017 02:18:30 -0700 (PDT) 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=1MH9SA5XmFCyCx/9RdtVULGwQNbP9XzVwuLpC1vewJE=; b=g7T3GOJz82ZYZCvNzkBNm+xNWDTo1Mg0IXnzZFCdArngURVAmyb+6UpoxpND8Z9pql jn5UpX7FgITfcUdZGGgSrmcrEheoM3eunsvSKGkmhKwLqT+P0Txcyy6w+613Vns3X44L JiQSQZAwQhKZAb/BJoguutOC+MhwegQoE9aPPW1hLRwwJ9IKVp3537t6K1G8A1fJ4Ohw mFLBuKj1EDOFrxNk3/oXoCKET1/pRWZFr2311Q/DYkUJiM7USjSx9IPoTnPg0JMIoVaK n3xx92QP9001pSkRUNO5TtBegYck4xhzH0BB9XH94s3mDFGRo0oehyHprYP0IJtdyr0/ oeNg== 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=1MH9SA5XmFCyCx/9RdtVULGwQNbP9XzVwuLpC1vewJE=; b=qGGReivTMRfu+iAMMFiuvbu1XTcVjZ3nduIoqleWGVHp56C6LpYUpUk6FkGFPuLfwg JBs/OXgZphx/NNdSmY/pQZHUNiX5ta2TF4MZnam5h7qVMukzVB7o9qpDYLb6W5BQrjmW GizaWNV1yRy+pCxNfWsST4EgyMBVLxJ4jgvVSBLFohIZ6+t9GVs5ciSVUiXHd24Pd/v2 6qcg5aeTGlaf4hY4EcJNV2ddut6OJ0x2ngol1404MdC1J7xrGJsj8K/tn8PaSE2eMynh mc0Z0LbnYoeuNUiC7VoFaz8RWAm+Fy8d6KpOaJXVccWgvFzsnPXy3OL0fdTAkbDrqZlz zOwQ== X-Gm-Message-State: AKS2vOygTWZYJVx3qbPErYv1Uxq663PBQfsLW82J4YKLnuwIaWFpVWaU drElomgB0qroBA== X-Received: by 10.98.71.206 with SMTP id p75mr24419376pfi.106.1497863905019; Mon, 19 Jun 2017 02:18:25 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id j27sm6624998pgn.63.2017.06.19.02.18.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 02:18:23 -0700 (PDT) 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: Mon, 19 Jun 2017 18:14:38 +0900 Message-Id: <149786367805.14868.13104785061519090144.sendpatchset@little-apple> In-Reply-To: <149786362527.14868.2143461703972595839.sendpatchset@little-apple> References: <149786362527.14868.2143461703972595839.sendpatchset@little-apple> Subject: [PATCH v4 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 V3: - None 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(+) --- 0021/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2017-06-19 14:05:33.720607110 +0900 @@ -1004,6 +1004,7 @@ static int ipmmu_probe(struct platform_d spin_lock_init(&mmu->lock); bitmap_zero(mmu->ctx, IPMMU_CTX_MAX); mmu->features = of_device_get_match_data(&pdev->dev); + 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);