From patchwork Tue Sep 20 12:12:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 9341561 X-Patchwork-Delegate: horms@verge.net.au 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 3A5BE601C2 for ; Tue, 20 Sep 2016 12:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 287442952F for ; Tue, 20 Sep 2016 12:20:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B59B29556; Tue, 20 Sep 2016 12:20:46 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI 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 371F52952F for ; Tue, 20 Sep 2016 12:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751449AbcITMUo (ORCPT ); Tue, 20 Sep 2016 08:20:44 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35458 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbcITMUn (ORCPT ); Tue, 20 Sep 2016 08:20:43 -0400 Received: by mail-pa0-f66.google.com with SMTP id hi10so872995pac.2 for ; Tue, 20 Sep 2016 05:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=1Dgf0RTYQtRslHs9+p2HXVS5xjlMcpQ9CO2iHJRpECU=; b=dHdoB1UWfW1J5RcSYuZqu+if9DTlLAIcDZNagFC2Zy4tnrEz69BvRahwQptOWuIy7X mryJ5PPmSAIvV2jfFUijhZePrwey65Np7/F1SDquoaSdj9OJgy+cLuInEim8joNu30H0 B5HJ21c0i4F7lgDPd/o8c0ne7/4ZeVzDCim41xj9aJzD0YCb6sw4X598JnpWKoH3piuS f3lHUwdC3OkOow63mp2o72AjYeucXBKsH02PGSKkbDS/gzi5sAc08f85odBylIAOJcLW LsIFQnXptz12gAjZC6IfqSvFuNNN7fjfKNnq1t+MvpIaZm7hkRZskC4cmL/cj/91j79C 5ZXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:date:message-id:subject; bh=1Dgf0RTYQtRslHs9+p2HXVS5xjlMcpQ9CO2iHJRpECU=; b=bP27JKYYuYzAQQ7Ltus3B3gMXM7//ZAL4S90frktTFEtber1LwVZR8b8MVUrZlyTYF t+WwWjbYBDVdCYclefhEr8mr6iWolgtj/S9HirXGfz6u8Hw9smy6APnw/jW2d/WYd9L0 pSFQRAycP+uj+QA2me/VOJnw25d5ITH/zZnOTApAepUkSG+gJVx9MNL5p7Baf4HNH3pJ 2wAkAbeGLgSLkc49Tr9tzqXPccFXgn62nWT7qp+ZEeKgTIJEMb3l5hPEPpmmrheqQB0+ sBM3zqf8X092j9bQHWGqPJ7C//0WqlwrFKCD02bOExTLcJxSZ9ECQ//oBfJxNScmgnBW y40w== X-Gm-Message-State: AE9vXwOmCJkGwAutCbKFP3p0yfr5km0nto2yR9C5+PCTsdc9k5hk1KbM2JSBIVS5ZJ0fWA== X-Received: by 10.66.43.82 with SMTP id u18mr55271049pal.28.1474374042530; Tue, 20 Sep 2016 05:20:42 -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 w69sm32127771pfd.28.2016.09.20.05.20.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Sep 2016 05:20:41 -0700 (PDT) From: Magnus Damm To: linux-renesas-soc@vger.kernel.org Cc: Magnus Damm Date: Tue, 20 Sep 2016 21:12:11 +0900 Message-Id: <20160920121211.14870.27506.sendpatchset@little-apple> Subject: [PATCH/RFC] ARM: dts: r8a7790: IPMMU-DS SYS-DMAC prototype 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 Hook up the SYS-DMAC devices to IPMMU-DS on r8a7790 and enable that particular IPMMU instance. Depending on kernel version LPAE may need to be enabled before the IPMMU driver becomes available. Useful to test the IPMMU with the devices hooked up to the SYS-DMAC via the DMA Engine framework together with the following workaround: [PATCH/RFC] iommu/ipmmu-vmsa: IPMMU SYS-DMAC iova mapping workaround Signed-off-by: Magnus Damm --- Tested with renesas-drivers-2016-09-13-v4.8-rc6 arch/arm/boot/dts/r8a7790.dtsi | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) --- 0003/arch/arm/boot/dts/r8a7790.dtsi +++ work/arch/arm/boot/dts/r8a7790.dtsi 2016-09-20 20:23:34.420607110 +0900 @@ -362,6 +362,21 @@ power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; #dma-cells = <1>; dma-channels = <15>; + iommus = <&ipmmu_ds 0>, + <&ipmmu_ds 1>, + <&ipmmu_ds 2>, + <&ipmmu_ds 3>, + <&ipmmu_ds 4>, + <&ipmmu_ds 5>, + <&ipmmu_ds 6>, + <&ipmmu_ds 7>, + <&ipmmu_ds 8>, + <&ipmmu_ds 9>, + <&ipmmu_ds 10>, + <&ipmmu_ds 11>, + <&ipmmu_ds 12>, + <&ipmmu_ds 13>, + <&ipmmu_ds 14>; }; dmac1: dma-controller@e6720000 { @@ -393,6 +408,21 @@ power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; #dma-cells = <1>; dma-channels = <15>; + iommus = <&ipmmu_ds 15>, + <&ipmmu_ds 16>, + <&ipmmu_ds 17>, + <&ipmmu_ds 18>, + <&ipmmu_ds 19>, + <&ipmmu_ds 20>, + <&ipmmu_ds 21>, + <&ipmmu_ds 22>, + <&ipmmu_ds 23>, + <&ipmmu_ds 24>, + <&ipmmu_ds 25>, + <&ipmmu_ds 26>, + <&ipmmu_ds 27>, + <&ipmmu_ds 28>, + <&ipmmu_ds 29>; }; audma0: dma-controller@ec700000 { @@ -1877,7 +1907,6 @@ interrupts = , ; #iommu-cells = <1>; - status = "disabled"; }; ipmmu_mp: mmu@ec680000 {