From patchwork Tue Feb 18 17:13:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11389021 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0CE892A for ; Tue, 18 Feb 2020 17:13:35 +0000 (UTC) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A8BD24656 for ; Tue, 18 Feb 2020 17:13:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux.kernel.org header.i=@linux.kernel.org header.b="dlSJaEJk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A8BD24656 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=bounce+26986+1404+1554929+3438807@linux.kernel.org X-Received: by 127.0.0.2 with SMTP id zqT5YY1556264xndEidWa4M6; Tue, 18 Feb 2020 09:13:35 -0800 X-Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web12.466.1582046014664289766 for ; Tue, 18 Feb 2020 09:13:34 -0800 X-Received: by mail.kernel.org (Postfix) id 6BC34208C4; Tue, 18 Feb 2020 17:13:34 +0000 (UTC) X-Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41BDD2176D; Tue, 18 Feb 2020 17:13:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41BDD2176D X-Received: by mail-oi1-f195.google.com with SMTP id b18so20861159oie.2; Tue, 18 Feb 2020 09:13:34 -0800 (PST) X-Gm-Message-State: ynt5NYdmX4wrHG1rSBnWFMDMx1554929AA= X-Google-Smtp-Source: APXvYqzM1O5/oeWQHJ8gT8Z9L53EKPDEEuwksZtS3dmhCEXg8KSK+0rIqhxLhSP9RCgQyZtde069lg== X-Received: by 2002:a05:6808:9ba:: with SMTP id e26mr1936616oig.81.1582046013542; Tue, 18 Feb 2020 09:13:33 -0800 (PST) X-Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id y25sm1545755oto.27.2020.02.18.09.13.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 09:13:33 -0800 (PST) From: Rob Herring To: Linuxkernel+Patchwork-Soc via Email Integration Cc: Alex Williamson , Borislav Petkov , Cornelia Huck , Daniel Lezcano , "David S. Miller" , devicetree@vger.kernel.org, Eric Auger , iommu@lists.linux-foundation.org, James Morse , Jens Axboe , Joerg Roedel , kvm@vger.kernel.org, linux-clk@vger.kernel.org, linux-edac@vger.kernel.org, linux-ide@vger.kernel.org, linux-pm@vger.kernel.org, Mauro Carvalho Chehab , netdev@vger.kernel.org, "Rafael J. Wysocki" , Robin Murphy , Stephen Boyd , Tony Luck , Viresh Kumar , Will Deacon Subject: [RFC PATCH 06/11] iommu: arm-smmu: Remove Calxeda secure mode quirk Date: Tue, 18 Feb 2020 11:13:16 -0600 Message-Id: <20200218171321.30990-7-robh@kernel.org> In-Reply-To: <20200218171321.30990-1-robh@kernel.org> References: <20200218171321.30990-1-robh@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: patchwork-soc@linux.kernel.org List-Id: Mailing-List: list patchwork-soc@linux.kernel.org; contact patchwork-soc+owner@linux.kernel.org Delivered-To: mailing list patchwork-soc@linux.kernel.org Reply-To: patchwork-soc+owner@linux.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux.kernel.org; q=dns/txt; s=20140610; t=1582046015; bh=KvwxarcSrctHEz79Nbd05BL0JsIIfx6GHc3gw5P73t8=; h=Cc:Date:From:Reply-To:Subject:To; b=dlSJaEJkq6VsQicuN1LLuhiuWoywURAOHazqDIR2MJJxA5wTYr+Z3Bw/3LnbHAPEkNB lgxVGslKk7HZ6rb/C7g/UEF07en+UYbCsMShjw/p07xhmevoWpafQdSgW/kYfDYzxqbF0 jmt1taDFvkwAXtiTdTN1CRUFwaerYj5NHR8= Cc: Will Deacon Cc: Robin Murphy Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Rob Herring --- Do not apply yet. drivers/iommu/arm-smmu-impl.c | 43 ----------------------------------- 1 file changed, 43 deletions(-) -- 2.20.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#1404): https://linux.kernel.org/g/patchwork-soc/message/1404 Mute This Topic: https://linux.kernel.org/mt/71375432/1554929 Group Owner: patchwork-soc+owner@linux.kernel.org Unsubscribe: https://linux.kernel.org/g/patchwork-soc/unsub [patchwork-linux-kernel-org@patchwork.kernel.org] -=-=-=-=-=-=-=-=-=-=-=- diff --git a/drivers/iommu/arm-smmu-impl.c b/drivers/iommu/arm-smmu-impl.c index 74d97a886e93..a3be8712d27f 100644 --- a/drivers/iommu/arm-smmu-impl.c +++ b/drivers/iommu/arm-smmu-impl.c @@ -9,45 +9,6 @@ #include "arm-smmu.h" - -static int arm_smmu_gr0_ns(int offset) -{ - switch(offset) { - case ARM_SMMU_GR0_sCR0: - case ARM_SMMU_GR0_sACR: - case ARM_SMMU_GR0_sGFSR: - case ARM_SMMU_GR0_sGFSYNR0: - case ARM_SMMU_GR0_sGFSYNR1: - case ARM_SMMU_GR0_sGFSYNR2: - return offset + 0x400; - default: - return offset; - } -} - -static u32 arm_smmu_read_ns(struct arm_smmu_device *smmu, int page, - int offset) -{ - if (page == ARM_SMMU_GR0) - offset = arm_smmu_gr0_ns(offset); - return readl_relaxed(arm_smmu_page(smmu, page) + offset); -} - -static void arm_smmu_write_ns(struct arm_smmu_device *smmu, int page, - int offset, u32 val) -{ - if (page == ARM_SMMU_GR0) - offset = arm_smmu_gr0_ns(offset); - writel_relaxed(val, arm_smmu_page(smmu, page) + offset); -} - -/* Since we don't care for sGFAR, we can do without 64-bit accessors */ -static const struct arm_smmu_impl calxeda_impl = { - .read_reg = arm_smmu_read_ns, - .write_reg = arm_smmu_write_ns, -}; - - struct cavium_smmu { struct arm_smmu_device smmu; u32 id_base; @@ -166,10 +127,6 @@ struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu) break; } - if (of_property_read_bool(smmu->dev->of_node, - "calxeda,smmu-secure-config-access")) - smmu->impl = &calxeda_impl; - if (of_device_is_compatible(smmu->dev->of_node, "qcom,sdm845-smmu-500")) return qcom_smmu_impl_init(smmu);