From patchwork Thu Mar 17 16:30:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 8613141 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 460109F44D for ; Thu, 17 Mar 2016 16:27:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B15142026F for ; Thu, 17 Mar 2016 16:27:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 156762026C for ; Thu, 17 Mar 2016 16:27:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936287AbcCQQ1F (ORCPT ); Thu, 17 Mar 2016 12:27:05 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:35766 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936285AbcCQQ1B (ORCPT ); Thu, 17 Mar 2016 12:27:01 -0400 Received: by mail-pf0-f178.google.com with SMTP id n5so127148162pfn.2; Thu, 17 Mar 2016 09:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=7Lqb1snKQRqrwtvoH/qSVL7F9LxhvGqfAAuREzfDFPw=; b=YCeHv8gkIfzdYxDgIhqYGLWYFbpEZdN2WGfoEzDWzxlwOLp4hDM6yI3bpiKP76giU3 DaiJJe3mkLeQmoidWbv3do50DRV8mFotTxQWtdRsR7bX0Yc91BeJuSboErV8Kwt3bH0j Oy71I2/HbG9tZprfK22RQHc+Xv7/2xxmfnnXoWbB70dUic5gIPeAQ/yV1g7+2jzcHgR6 qdzRyqyscm7ypcgsUCeGLcSvp7d7qgqLclI9b1xCPTZZzXkGkvq+mMcCcHW7bqVFDNh8 9vSHvQdstRfy+WaRRjhvmBfmHPGmsohIh71YI0THWhKcTUek5+IQ6Gmw+94jCzOrkqFS L1OA== 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:in-reply-to :references:subject; bh=7Lqb1snKQRqrwtvoH/qSVL7F9LxhvGqfAAuREzfDFPw=; b=Tjw64VBMTLIgMUBI7ETksPR8TynIM0bZMkb85NnwIxk8e2InTZq+1kab6LqKMiBZzj w4Tuo1kzQz0forWy8LfBqOQei8C4GEVzXUi6lT8py9tFBUHWUqq8/QKvk+aIeY0A2XlK CHv8zwoqjdHBb4BwmgFuFOLV2KyjJsLS0vW3g1VFYx/X3E75ptDhd+nFcRAim67k2Kva U5Nh7VFz4QoHXkum7hUz07nIEkFl1mIh9En2FrQUCPNeImYE8LkPHOVY/YFb3mSrkrjC NnnYuH7DZz8pZJViRMLZRAhHAtm8exCnBguwWpAyhccaZjoGdSxgGLXPjqvCU1vFkW+Q /Qiw== X-Gm-Message-State: AD7BkJIf3LenGvulbcnR8+96fJKNUEwwApg0/KbD1XkQbFNqreX7XLLh6l3RuJ9MaipXOw== X-Received: by 10.98.67.199 with SMTP id l68mr16145032pfi.18.1458232020429; Thu, 17 Mar 2016 09:27:00 -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 f12sm14500674pfd.87.2016.03.17.09.26.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Mar 2016 09:26:59 -0700 (PDT) From: Magnus Damm To: iommu@lists.linux-foundation.org Cc: laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be, joro@8bytes.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, horms+renesas@verge.net.au, Magnus Damm Date: Fri, 18 Mar 2016 01:30:23 +0900 Message-Id: <20160317163023.24104.41969.sendpatchset@little-apple> In-Reply-To: <20160317162909.24104.31682.sendpatchset@little-apple> References: <20160317162909.24104.31682.sendpatchset@little-apple> Subject: [PATCH 08/10] iommu/ipmmu-vmsa: Make IMBUSCTR setup optional Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm Allow certain DT compat strings to opt-out of setting up IMBUSCR. The default case is unchanged. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- 0023/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2016-03-18 00:32:45.550513000 +0900 @@ -36,6 +36,7 @@ struct ipmmu_features { bool use_ns_alias_offset; bool has_cache_leaf_nodes; + bool setup_imbuscr; }; struct ipmmu_vmsa_device { @@ -415,10 +416,10 @@ static int ipmmu_domain_init_context(str ipmmu_ctx_write(domain, IMMAIR0, domain->cfg.arm_lpae_s1_cfg.mair[0]); /* IMBUSCR */ - ipmmu_ctx_write(domain, IMBUSCR, - ipmmu_ctx_read(domain, IMBUSCR) & - ~(IMBUSCR_DVM | IMBUSCR_BUSSEL_MASK)); - + if (domain->root->features->setup_imbuscr) + ipmmu_ctx_write(domain, IMBUSCR, + ipmmu_ctx_read(domain, IMBUSCR) & + ~(IMBUSCR_DVM | IMBUSCR_BUSSEL_MASK)); /* * IMSTR * Clear all interrupt flags. @@ -992,6 +993,7 @@ static void ipmmu_device_reset(struct ip static const struct ipmmu_features ipmmu_features_default = { .use_ns_alias_offset = true, .has_cache_leaf_nodes = false, + .setup_imbuscr = true, }; static const struct of_device_id ipmmu_of_ids[] = {