From patchwork Sun Jun 17 10:54:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 10468781 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 AF1B0600CC for ; Sun, 17 Jun 2018 10:52:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5E4D2894C for ; Sun, 17 Jun 2018 10:52:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98267289B9; Sun, 17 Jun 2018 10:52:37 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 34AEF2894C for ; Sun, 17 Jun 2018 10:52:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933596AbeFQKwg (ORCPT ); Sun, 17 Jun 2018 06:52:36 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:40424 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933588AbeFQKwg (ORCPT ); Sun, 17 Jun 2018 06:52:36 -0400 Received: by mail-pf0-f195.google.com with SMTP id z24-v6so6824775pfe.7 for ; Sun, 17 Jun 2018 03:52:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:date:message-id:subject; bh=tm1GJ8r6taCXzpL18zB9HMupoP2De9nSUXmEdRAg8vo=; b=FVh63Ad/Z4uw96jJfw9BLJuFT4DuLttoTbeRLijm6ZWr/umn5gk1mJNrAFjn/6l08F CA/fvNamjzdSX5s4WkD9+pj/db3zGA/ByqI+TH7j1klq9+rzSDZMLnCRzjM9Ag1Vxu3Y F8UA6UgXHpQh6aaew/w1OlDGySvcVWVGICo6eI77/iJ28WQckdPe70EIvi9WtP/5DR2A cykHq7pPQeFPP0vNz3NFPbcvkfXMIVj222XCo3hyw/p1LKJWcoSnnJ7T0d8lu6ghbykV g3NV1nC8x4zdhAzxtGbWEO0CkdEs21FJfvwgY3qnLZnmFhQtW/KlGtoAbIuBifw7nLtB cJPA== 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:subject; bh=tm1GJ8r6taCXzpL18zB9HMupoP2De9nSUXmEdRAg8vo=; b=ZJXueqxbcSMoshfjPx74jD7TiBGE8HdUcwo/qb02e8v7mxDrjXWHOj2l8y4gQt2yVo nmHzhWBgJFeC/hiCJkiC7V08lLRSHhXM14rNHibhhpQ2mAUjasbajbna/smGZF7jZP// J30sCstxXrC09QPgWKcjyBVAGYAJqJQscv0Fat+Msk39kJzv+XpipAc5HpuCy9AYtrNZ /coFQr8qKAM6zB+un4G7QLAomTWMxmcv8bReW0ltuQgzXZkauyWs/mSdvEVucjvLmdYF iWHNnTkXHpFp9tBE0obHsnhUEpWTDcc7e+VjXIJTcWLznuo+N5me9E9H1wj77g/kJOE6 ibeQ== X-Gm-Message-State: APt69E0u50+MWcsUWqTZSPvJK67riis6s17QVsmhhhZrhKsfy8OJ9MGJ aFyr+EA+eBbe/TRqBcDfsQaUzsUK X-Google-Smtp-Source: ADUXVKL+rxOU65F6BxMWzmJOwe2ZwUOmuSRCcMT5dBQaaldQpUwZ99U3AJeXkRFm+uW/DMDKtU4c5g== X-Received: by 2002:a62:3c15:: with SMTP id j21-v6mr9291580pfa.7.1529232755488; Sun, 17 Jun 2018 03:52:35 -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 i88-v6sm28942662pfi.153.2018.06.17.03.52.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Jun 2018 03:52:34 -0700 (PDT) From: Magnus Damm To: linux-renesas-soc@vger.kernel.org Cc: Magnus Damm Date: Sun, 17 Jun 2018 19:54:12 +0900 Message-Id: <152923285268.19253.8187284565521042664.sendpatchset@little-apple> Subject: [PATCH] arm64: dts: renesas: IPMMU deferred probe test 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 Here's my local modification to test IPMMU with SYS-DMAC and the SCIF console on r8a7795 H3ULCB. The dmac1 and dmac2 devices together with audio dmacs are added to the IPMMU white list. The dmac0 device is disabled in DT to easily be able to associate the /proc/interrupt counters with the console activity. A quick test has been performed by checking the console boot log output (no errors and DMACs are assigned to the IPMMU) and also validating that SCIF console activity results in incrementing /proc/interrupts counters associated with the DMAC channels. Audio has not been tested. Not-Signed-off-by: Magnus Damm --- Used together with renesas-drivers-2018-06-05-v4.17 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 1 + drivers/iommu/ipmmu-vmsa.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) --- 0001/arch/arm64/boot/dts/renesas/r8a7795.dtsi +++ work/arch/arm64/boot/dts/renesas/r8a7795.dtsi @@ -839,6 +839,7 @@ <&ipmmu_ds0 10>, <&ipmmu_ds0 11>, <&ipmmu_ds0 12>, <&ipmmu_ds0 13>, <&ipmmu_ds0 14>, <&ipmmu_ds0 15>; + status = "disabled"; }; dmac1: dma-controller@e7300000 { --- 0001/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c @@ -756,6 +756,18 @@ static int ipmmu_init_platform_device(st static bool ipmmu_slave_whitelist(struct device *dev) { + if (!strcmp(dev_name(dev), "e7300000.dma-controller")) + return true; + + if (!strcmp(dev_name(dev), "e7310000.dma-controller")) + return true; + + if (!strcmp(dev_name(dev), "ec700000.dma-controller")) + return true; + + if (!strcmp(dev_name(dev), "ec720000.dma-controller")) + return true; + /* By default, do not allow use of IPMMU */ return false; }