From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B765CC433E1 for ; Mon, 25 May 2020 06:13:20 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A67D2071A for ; Mon, 25 May 2020 06:13:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="vAcp9De3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A67D2071A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0662985F81; Mon, 25 May 2020 06:13:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Krk-WbD3JVZk; Mon, 25 May 2020 06:13:19 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id ED97F85D8F; Mon, 25 May 2020 06:13:18 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C58EAC088D; Mon, 25 May 2020 06:13:18 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C750DC016F for ; Mon, 25 May 2020 06:13:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B82C0878C4 for ; Mon, 25 May 2020 06:13:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id anb4WBXblIM2 for ; Mon, 25 May 2020 06:13:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailgw01.mediatek.com (unknown [1.203.163.78]) by hemlock.osuosl.org (Postfix) with ESMTP id 5BB34876A0 for ; Mon, 25 May 2020 06:13:15 +0000 (UTC) X-UUID: 1689848e2ef64c158ed97b7d0f06d0f0-20200525 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=4/4tyFF13ExXdeCjudAPME2PjshhSd+G5yUb+3jQX6c=; b=vAcp9De36AsutujK+9KbaHTnQbyL9LOdmqnpYpQFuEUFDKkGvBW5jjoG5WOBOJIGwHDpb1mshel7U/Wsact9KWkzaPsX3G12OCjSlPBOGyHy6XyFWRiXI52Wo2XZhHmD+tSjBY8tYMzY1t4pBjssw3zl8K2LVevujgfM+eUbfic=; X-UUID: 1689848e2ef64c158ed97b7d0f06d0f0-20200525 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 139799003; Mon, 25 May 2020 14:13:09 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS32N2.mediatek.inc (172.27.4.72) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 25 May 2020 14:13:08 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 25 May 2020 14:13:07 +0800 Message-ID: <1590387086.13912.4.camel@mhfsdcap03> Subject: Re: [PATCH v3 2/7] iommu/mediatek: Rename the register STANDARD_AXI_MODE(0x48) to MISC_CTRL From: Yong Wu To: Chao Hao Date: Mon, 25 May 2020 14:11:26 +0800 In-Reply-To: <20200509083654.5178-3-chao.hao@mediatek.com> References: <20200509083654.5178-1-chao.hao@mediatek.com> <20200509083654.5178-3-chao.hao@mediatek.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 9F19ACAE1B3DEF7E5400D3D9BC819389FFCDC31F868E03319EA154150F0F08962000:8 X-MTK: N Cc: devicetree@vger.kernel.org, FY Yang , wsd_upstream@mediatek.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Rob Herring , linux-mediatek@lists.infradead.org, Matthias Brugger , Jun Yan , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Sat, 2020-05-09 at 16:36 +0800, Chao Hao wrote: > For iommu offset=0x48 register, only the previous mt8173/mt8183 use the > name STANDARD_AXI_MODE, all the latest SoC extend the register more > feature by different bits, for example: axi_mode, in_order_en, coherent_en > and so on. So rename REG_MMU_MISC_CTRL may be more proper. > > This patch only rename the register name, no functional change. > > Signed-off-by: Chao Hao Reviewed-by: Yong Wu > --- > drivers/iommu/mtk_iommu.c | 14 +++++++------- > drivers/iommu/mtk_iommu.h | 2 +- > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > index 5f4d6df59cf6..e7e7c7695ed1 100644 > --- a/drivers/iommu/mtk_iommu.c > +++ b/drivers/iommu/mtk_iommu.c > @@ -41,7 +41,7 @@ > #define F_INVLD_EN0 BIT(0) > #define F_INVLD_EN1 BIT(1) > > -#define REG_MMU_STANDARD_AXI_MODE 0x048 > +#define REG_MMU_MISC_CTRL 0x048 > #define REG_MMU_DCM_DIS 0x050 > > #define REG_MMU_CTRL_REG 0x110 > @@ -585,8 +585,10 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data) > } > writel_relaxed(0, data->base + REG_MMU_DCM_DIS); > > - if (data->plat_data->reset_axi) > - writel_relaxed(0, data->base + REG_MMU_STANDARD_AXI_MODE); > + if (data->plat_data->reset_axi) { > + /* The register is called STANDARD_AXI_MODE in this case */ > + writel_relaxed(0, data->base + REG_MMU_MISC_CTRL); > + } > > if (devm_request_irq(data->dev, data->irq, mtk_iommu_isr, 0, > dev_name(data->dev), (void *)data)) { > @@ -730,8 +732,7 @@ static int __maybe_unused mtk_iommu_suspend(struct device *dev) > struct mtk_iommu_suspend_reg *reg = &data->reg; > void __iomem *base = data->base; > > - reg->standard_axi_mode = readl_relaxed(base + > - REG_MMU_STANDARD_AXI_MODE); > + reg->misc_ctrl = readl_relaxed(base + REG_MMU_MISC_CTRL); > reg->dcm_dis = readl_relaxed(base + REG_MMU_DCM_DIS); > reg->ctrl_reg = readl_relaxed(base + REG_MMU_CTRL_REG); > reg->int_control0 = readl_relaxed(base + REG_MMU_INT_CONTROL0); > @@ -755,8 +756,7 @@ static int __maybe_unused mtk_iommu_resume(struct device *dev) > dev_err(data->dev, "Failed to enable clk(%d) in resume\n", ret); > return ret; > } > - writel_relaxed(reg->standard_axi_mode, > - base + REG_MMU_STANDARD_AXI_MODE); > + writel_relaxed(reg->misc_ctrl, base + REG_MMU_MISC_CTRL); > writel_relaxed(reg->dcm_dis, base + REG_MMU_DCM_DIS); > writel_relaxed(reg->ctrl_reg, base + REG_MMU_CTRL_REG); > writel_relaxed(reg->int_control0, base + REG_MMU_INT_CONTROL0); > diff --git a/drivers/iommu/mtk_iommu.h b/drivers/iommu/mtk_iommu.h > index ea949a324e33..1b6ea839b92c 100644 > --- a/drivers/iommu/mtk_iommu.h > +++ b/drivers/iommu/mtk_iommu.h > @@ -18,7 +18,7 @@ > #include > > struct mtk_iommu_suspend_reg { > - u32 standard_axi_mode; > + u32 misc_ctrl; > u32 dcm_dis; > u32 ctrl_reg; > u32 int_control0; _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu