Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp12411465imu; Tue, 1 Jan 2019 23:18:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN62ic09c6oU6qZUoGYprTPl6rzJzCcdggLIg+LrtGfWFvmVvuaPvvSFDXACpsWnL30OGQNT X-Received: by 2002:a17:902:8f97:: with SMTP id z23mr42966626plo.283.1546413506919; Tue, 01 Jan 2019 23:18:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546413506; cv=none; d=google.com; s=arc-20160816; b=SaR0WgoeIPDARV+HACDM/mBivrUCWx9+T+eMXCoii/WAlfPoVVv9mcqEwvr7ymYkhp 6oOYa+f5gR/0Oqpt+C6tpnqXAwnR8DKGPhOfckBSp4YUvl3hT8GgAFN7e7oR6ukk0eZ1 m6VIUmPasrQOlfVGQ5XiMofgcK+/SQM/B+WFOD23inZTGh47L+lKouNlwDPM1hDEjq8t b6jApFvQjOqa7GrNpOL/yMZoW4TZpiDBhQ5kTCAl/hJ0gJlraiyegbwvGqVlAG/gni3H zjoRe3vsP4J4Q2CXNSFdwkRsmkCHl1w5ZuQPtq3U7WkUFSuamtnzSdzU81HNUVwYyie3 9elg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=hxsCIc2Rx1Ms2RCfEbVuhSTlGaapJ79FpT93F2PUHUc=; b=I6Gka3q6z/Tbx5CVhll52w5dh9IjyZBXfIMz75GMBuXJL97HOYJFZJSH3NP8q0tcyU vHpI1mn75JwmOVJvOzrbUGgCpHEmAS3KsU1r4kexLuO4tqVh9ytOJs4sNqUaUCiRnsLJ 8+b+2LpUVYPOFO2RO3KKENgkewNxX7mAShlfsw/TIw2sfC+cA2VSsZw5kZSaSs8iS+3r IRzqo+jqVbK5YRBeCqXa5p1vzgO5N/99Po9mMvFpVWawuqEIBmajoQVffodkE+dYzh5W JW00z3iAEwqneacJsHOaeEfrLi+egBzlAT30jYaPt9JsBJlGeqotDpAVhplpTDlpd/nb z7iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SvQy1Urm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si35949439plt.356.2019.01.01.23.17.57; Tue, 01 Jan 2019 23:18:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SvQy1Urm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728695AbfABGns (ORCPT + 99 others); Wed, 2 Jan 2019 01:43:48 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:45710 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbfABGns (ORCPT ); Wed, 2 Jan 2019 01:43:48 -0500 Received: by mail-qt1-f195.google.com with SMTP id e5so32526395qtr.12 for ; Tue, 01 Jan 2019 22:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hxsCIc2Rx1Ms2RCfEbVuhSTlGaapJ79FpT93F2PUHUc=; b=SvQy1UrmCX3e3pFfyZYNF4KHchd+78j1fnOyCirYwhiJ3L+feAsy2Bq1uCZWMTf5bI XgvUuchUGViu/X8xZ2qHCr+jEnKlCGGptMp7Kgwo+7X06/j6v1f8ntL7x4qCplwop8W2 gi9PyZuKWf+0evskFQp31yDQgfsLAnA6PbPdo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hxsCIc2Rx1Ms2RCfEbVuhSTlGaapJ79FpT93F2PUHUc=; b=bzb0svaigsc7q8yjfpYHKSuMIY5Z0MJfvSIc55iGAEjG6D7FI1MQ6/ESJa0LmF/Jyw TB2sTATXN5muCuaCEIGv3CEcSI1RD6j+p/WvyYXgJ7gOU1VLIt8M3H6wTSyMTwqRcqXT XtHSR2QNd1lubeZcsmI0tfTkddKva6DiwQwRVa4+HVcZUCW8o8vxrxcdQpQASRmZgbnn lf3Vcbo6cDvd2P12tMlerzFdtVeszC/tNuh+kAgqXG1BxhXEOg+RA5uivEA+0G5qHfAy LT2FriIRBq6tm0g1+qqrEfRX+1oz69VwuRemqtvfQeIQMWoxcc4cpplKzgU8o8YdATWE VBRg== X-Gm-Message-State: AA+aEWbbjHguxtb2LYMaT1ZkJXi2J+LIx3+lWxcu78A8hokoECsA2qBN GV/INNKGIPQ2gRQVAuiGg4hCBgg2fzfLxcZ+LHdRrbval5rVUw== X-Received: by 2002:ac8:6b50:: with SMTP id x16mr42237246qts.368.1546411426948; Tue, 01 Jan 2019 22:43:46 -0800 (PST) MIME-Version: 1.0 References: <1546314952-15990-1-git-send-email-yong.wu@mediatek.com> <1546314952-15990-11-git-send-email-yong.wu@mediatek.com> In-Reply-To: <1546314952-15990-11-git-send-email-yong.wu@mediatek.com> From: Nicolas Boichat Date: Wed, 2 Jan 2019 14:43:36 +0800 Message-ID: Subject: Re: [PATCH v5 10/20] iommu/mediatek: Move reset_axi into plat_data To: Yong Wu Cc: Joerg Roedel , Matthias Brugger , Robin Murphy , Rob Herring , Tomasz Figa , Will Deacon , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, devicetree@vger.kernel.org, lkml , linux-arm Mailing List , iommu@lists.linux-foundation.org, Arnd Bergmann , Yingjoe Chen , youlin.pei@mediatek.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 1, 2019 at 11:58 AM Yong Wu wrote: > > In mt8173 and mt8183, 0x48 is REG_MMU_STANDARD_AXI_MODE while > it is extended to REG_MMU_CTRL which contains _STANDARD_AXI_MODE in > the other SoCs. I move this property to plat_data since both mt8173 > and mt8183 use this property. > > It is a preparing patch for mt8183. > > Signed-off-by: Yong Wu Reviewed-by: Nicolas Boichat > --- > drivers/iommu/mtk_iommu.c | 4 ++-- > drivers/iommu/mtk_iommu.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c > index 35a1263..8d8ab21 100644 > --- a/drivers/iommu/mtk_iommu.c > +++ b/drivers/iommu/mtk_iommu.c > @@ -558,8 +558,7 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data) > } > writel_relaxed(0, data->base + REG_MMU_DCM_DIS); > > - /* It's MISC control register whose default value is ok except mt8173.*/ > - if (data->plat_data->m4u_plat == M4U_MT8173) > + if (data->plat_data->reset_axi) > writel_relaxed(0, data->base + REG_MMU_STANDARD_AXI_MODE); > > if (devm_request_irq(data->dev, data->irq, mtk_iommu_isr, 0, > @@ -749,6 +748,7 @@ static int __maybe_unused mtk_iommu_resume(struct device *dev) > .m4u_plat = M4U_MT8173, > .has_4gb_mode = true, > .has_bclk = true, > + .reset_axi = true, > .larbid_remap = {0, 1, 2, 3, 4, 5}, /* Linear mapping. */ > }; > > diff --git a/drivers/iommu/mtk_iommu.h b/drivers/iommu/mtk_iommu.h > index eec19a6..b46aeaa 100644 > --- a/drivers/iommu/mtk_iommu.h > +++ b/drivers/iommu/mtk_iommu.h > @@ -47,7 +47,7 @@ struct mtk_iommu_plat_data { > > /* HW will use the EMI clock if there isn't the "bclk". */ > bool has_bclk; > - > + bool reset_axi; > unsigned char larbid_remap[MTK_LARB_NR_MAX]; > }; > > -- > 1.9.1 >