From patchwork Tue Dec 15 13:05:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 7854631 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7CD76BEEE1 for ; Tue, 15 Dec 2015 13:06:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 87F93201F5 for ; Tue, 15 Dec 2015 13:06:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 752D22035E for ; Tue, 15 Dec 2015 13:06:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933092AbbLONEI (ORCPT ); Tue, 15 Dec 2015 08:04:08 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:33216 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932176AbbLONEH (ORCPT ); Tue, 15 Dec 2015 08:04:07 -0500 Received: by mail-pf0-f180.google.com with SMTP id n128so4653370pfn.0; Tue, 15 Dec 2015 05:04:07 -0800 (PST) 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=AhaB4UBaflzVNdjJR2SlmKAkyNHVweUyMHcSuF4GG08=; b=O2bvxtP3r4lZj7snBrrHqN1MG9sAFhJLUxSUpo21r9nH9RYxtY5yb38gEybN8JTUdl dLVhEzEfo82+kSqzCV1IfrJp+6ey8RJTdBtBTbvuNvm15tGl5NFG6NuQk5uyWtz7vZlF j8zQJmusavpk47cnF9rgOYxG1RI55DJgnjAHrY3Qv+XqK3+7lfqPktygyjBP7PW1zc00 dynkhko7neqK/oeXWr9B12JtauHEENHa/LjXhrQhKRu/Xd8YwxEQJZB+XFXNuPOKeAKH xVRcxWJq5efcnLfeVBs781tEsRh3BqFFNjQ+F9hZJ3ahsE1dTKy0RKkwtXpr2Ogf08Lj uXqA== X-Received: by 10.98.16.20 with SMTP id y20mr39741740pfi.45.1450184646954; Tue, 15 Dec 2015 05:04:06 -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 q23sm2343271pfi.34.2015.12.15.05.04.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Dec 2015 05:04:05 -0800 (PST) From: Magnus Damm To: iommu@lists.linux-foundation.org Cc: laurent.pinchart+renesas@ideasonboard.com, geert+renesas@glider.be, linux-sh@vger.kernel.org, joro@8bytes.org, linux-kernel@vger.kernel.org, horms+renesas@verge.net.au, Magnus Damm Date: Tue, 15 Dec 2015 22:05:46 +0900 Message-Id: <20151215130546.13535.13440.sendpatchset@little-apple> In-Reply-To: <20151215130508.13535.26186.sendpatchset@little-apple> References: <20151215130508.13535.26186.sendpatchset@little-apple> Subject: [PATCH/RFC 04/10] iommu/ipmmu-vmsa: Make IMBUSCTR setup optional Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@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, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0016/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2015-12-15 14:18:20.730513000 +0900 @@ -34,6 +34,7 @@ struct ipmmu_features { bool use_ns_alias_offset; bool has_cache_leaf_nodes; + bool setup_imbuscr; }; struct ipmmu_vmsa_device { @@ -435,10 +436,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. @@ -876,6 +877,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[] = {