Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1710210
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Yong Wu <yong.wu@mediatek.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/8] iommu/mediatek: Disable iommu clock when system suspend |
| Date | Sat, 12 Aug 2017 11:40:02 +0200 |
| Message-ID | <udB3H-7jv-13@gated-at.bofh.it> (permalink) |
| References | <udeTw-1T8-7@gated-at.bofh.it> <udeTx-1T8-31@gated-at.bofh.it> <udg8W-2Q4-5@gated-at.bofh.it> |
| Content-Type | text/plain; charset="UTF-8" |
| X-Mailer | Evolution 3.2.3-0ubuntu6 |
| Content-Transfer-Encoding | 7bit |
| MIME-Version | 1.0 |
| X-Mtk | N |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 49 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Joerg Roedel <joro@8bytes.org>, Rob Herring <robh+dt@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, Robin Murphy <robin.murphy@arm.com>, Will Deacon <will.deacon@arm.com>, Daniel Kurtz <djkurtz@google.com>, Tomasz Figa <tfiga@google.com>, Mark Rutland <mark.rutland@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, <linux-mediatek@lists.infradead.org>, <srv_heupstream@mediatek.com>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <iommu@lists.linux-foundation.org>, <arnd@arndb.de>, <honghui.zhang@mediatek.com>, <k.zhang@mediatek.com>, <cloud.chou@mediatek.com>, <youlin.pei@mediatek.com> |
| X-Original-Date | Sat, 12 Aug 2017 17:34:32 +0800 |
| X-Original-Message-ID | <1502530472.11148.54.camel@mhfsdcap03> |
| X-Original-References | <1502445377-26936-1-git-send-email-yong.wu@mediatek.com> <1502445377-26936-6-git-send-email-yong.wu@mediatek.com> <b451cb47-505e-c300-42fd-9cb73c09ef0b@gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1710210 |
Show key headers only | View raw
On Fri, 2017-08-11 at 16:39 +0530, Arvind Yadav wrote:
> Hi Youn,
>
>
> On Friday 11 August 2017 03:26 PM, Yong Wu wrote:
> > When system suspend, infra power domain may be off, and the iommu's
> > clock must be disabled when system off, or the iommu's bclk clock maybe
> > disabled after system resume.
> >
> > Signed-off-by: Honghui Zhang <honghui.zhang@mediatek.com>
> > Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> > ---
> > drivers/iommu/mtk_iommu.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
> > index e81ed9a..b7c8e52 100644
> > --- a/drivers/iommu/mtk_iommu.c
> > +++ b/drivers/iommu/mtk_iommu.c
> > @@ -675,6 +675,7 @@ static int __maybe_unused mtk_iommu_suspend(struct device *dev)
> > reg->ctrl_reg = readl_relaxed(base + REG_MMU_CTRL_REG);
> > reg->int_control0 = readl_relaxed(base + REG_MMU_INT_CONTROL0);
> > reg->int_main_control = readl_relaxed(base + REG_MMU_INT_MAIN_CONTROL);
> > + clk_disable_unprepare(data->bclk);
> > return 0;
> > }
> >
> > @@ -684,6 +685,7 @@ static int __maybe_unused mtk_iommu_resume(struct device *dev)
> > struct mtk_iommu_suspend_reg *reg = &data->reg;
> > void __iomem *base = data->base;
> >
> > + clk_prepare_enable(data->bclk);
> Please handle return value of clk_prepare_enable. It can fail
Thanks for the reminding. I will add it in next version.
> > writel_relaxed(reg->standard_axi_mode,
> > base + REG_MMU_STANDARD_AXI_MODE);
> > writel_relaxed(reg->dcm_dis, base + REG_MMU_DCM_DIS);
> > @@ -699,7 +701,7 @@ static int __maybe_unused mtk_iommu_resume(struct device *dev)
> > }
> >
> > static const struct dev_pm_ops mtk_iommu_pm_ops = {
> > - SET_SYSTEM_SLEEP_PM_OPS(mtk_iommu_suspend, mtk_iommu_resume)
> > + SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mtk_iommu_suspend, mtk_iommu_resume)
> > };
> >
> > static const struct of_device_id mtk_iommu_of_ids[] = {
> ~arvind
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 5/8] iommu/mediatek: Disable iommu clock when system suspend Yong Wu <yong.wu@mediatek.com> - 2017-08-11 12:00 +0200
Re: [PATCH 5/8] iommu/mediatek: Disable iommu clock when system suspend Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-11 13:20 +0200
Re: [PATCH 5/8] iommu/mediatek: Disable iommu clock when system suspend Yong Wu <yong.wu@mediatek.com> - 2017-08-12 11:40 +0200
csiph-web