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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 D75DBECE58F for ; Tue, 15 Oct 2019 12:31:03 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (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 B3FE320854 for ; Tue, 15 Oct 2019 12:31:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3FE320854 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 4861CB49; Tue, 15 Oct 2019 12:31:03 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id DCF98491 for ; Tue, 15 Oct 2019 12:31:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from theia.8bytes.org (8bytes.org [81.169.241.247]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 192738B1 for ; Tue, 15 Oct 2019 12:31:01 +0000 (UTC) Received: by theia.8bytes.org (Postfix, from userid 1000) id 27D5E2DF; Tue, 15 Oct 2019 14:30:58 +0200 (CEST) Date: Tue, 15 Oct 2019 14:30:53 +0200 From: Joerg Roedel To: Yong Wu Subject: Re: [PATCH] memory: mtk-smi: Add PM suspend and resume ops Message-ID: <20191015123053.GA17570@8bytes.org> References: <1570622373-16413-1-git-send-email-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1570622373-16413-1-git-send-email-yong.wu@mediatek.com> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: youlin.pei@mediatek.com, anan.sun@mediatek.com, Nicolas Boichat , srv_heupstream@mediatek.com, Will Deacon , linux-kernel@vger.kernel.org, Evan Green , Tomasz Figa , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, Matthias Brugger , ming-fan.chen@mediatek.com, Robin Murphy , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 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 Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org On Wed, Oct 09, 2019 at 07:59:33PM +0800, Yong Wu wrote: > In the commit 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback > to enable clocks"), we use pm_runtime callback to enable/disable the smi > larb clocks. It will cause the larb's clock may not be disabled when > suspend. That is because device_prepare will call pm_runtime_get_noresume > which will keep the larb's PM runtime status still is active when suspend, > then it won't enter our pm_runtime suspend callback to disable the > corresponding clocks. > > This patch adds suspend pm_ops to force disable the clocks, Use "LATE" to > make sure it disable the larb's clocks after the multimedia devices. > > Fixes: 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks") > Signed-off-by: Anan Sun > Signed-off-by: Yong Wu > --- > base on v5.4-rc1. > --- > drivers/memory/mtk-smi.c | 4 ++++ > 1 file changed, 4 insertions(+) Applied, thanks. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH] memory: mtk-smi: Add PM suspend and resume ops Date: Tue, 15 Oct 2019 14:30:53 +0200 Message-ID: <20191015123053.GA17570@8bytes.org> References: <1570622373-16413-1-git-send-email-yong.wu@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1570622373-16413-1-git-send-email-yong.wu-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Yong Wu Cc: youlin.pei-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, anan.sun-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, Nicolas Boichat , srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, Will Deacon , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Evan Green , Tomasz Figa , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Matthias Brugger , ming-fan.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org, Robin Murphy , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-mediatek@lists.infradead.org On Wed, Oct 09, 2019 at 07:59:33PM +0800, Yong Wu wrote: > In the commit 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback > to enable clocks"), we use pm_runtime callback to enable/disable the smi > larb clocks. It will cause the larb's clock may not be disabled when > suspend. That is because device_prepare will call pm_runtime_get_noresume > which will keep the larb's PM runtime status still is active when suspend, > then it won't enter our pm_runtime suspend callback to disable the > corresponding clocks. > > This patch adds suspend pm_ops to force disable the clocks, Use "LATE" to > make sure it disable the larb's clocks after the multimedia devices. > > Fixes: 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks") > Signed-off-by: Anan Sun > Signed-off-by: Yong Wu > --- > base on v5.4-rc1. > --- > drivers/memory/mtk-smi.c | 4 ++++ > 1 file changed, 4 insertions(+) Applied, thanks. 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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 40535C10F14 for ; Tue, 15 Oct 2019 12:31:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0F3A421925 for ; Tue, 15 Oct 2019 12:31:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MkiVVMos" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F3A421925 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rRWfKcdxbBbU1oExUl/kK++NcAFvAQlweu7K4OE5044=; b=MkiVVMosN//ws8 v81a/i2fmg1cRXgMirGuPplw73UYoBv8vCcgrggY/ShiVRXCzHwQFs5Z8SJmGPAmznlCt8PsxeS6e WnXMj/5QjSOTdqBGTpx4pWb0KWGzMZpPXtPsIGxebV+AYIhiyNSikOt5wsX0ufUuqhp3VhjBhIxxX C4mLIVEN2QRl74YkiL7kNIavAqJ8ojOSmAMz28R5WlQFRffwS6GTFU0HFmjrw5D5iS3KNUKA66A4K 4AbOnYpPQ1AdqNATP31JgXxAK0+qGqGrISWlYx/mjWlIUIfz/YK7lHXBQmp0aHkCOeB3MIq/TostS JQq9g9VmF5yfUVo1VzTw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKLyi-0003Rl-Nn; Tue, 15 Oct 2019 12:31:04 +0000 Received: from 8bytes.org ([2a01:238:4383:600:38bc:a715:4b6d:a889] helo=theia.8bytes.org) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iKLyg-0003Q7-4P; Tue, 15 Oct 2019 12:31:03 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id 27D5E2DF; Tue, 15 Oct 2019 14:30:58 +0200 (CEST) Date: Tue, 15 Oct 2019 14:30:53 +0200 From: Joerg Roedel To: Yong Wu Subject: Re: [PATCH] memory: mtk-smi: Add PM suspend and resume ops Message-ID: <20191015123053.GA17570@8bytes.org> References: <1570622373-16413-1-git-send-email-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1570622373-16413-1-git-send-email-yong.wu@mediatek.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191015_053102_328220_C35D4268 X-CRM114-Status: GOOD ( 11.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: youlin.pei@mediatek.com, anan.sun@mediatek.com, Nicolas Boichat , srv_heupstream@mediatek.com, Will Deacon , linux-kernel@vger.kernel.org, Evan Green , Tomasz Figa , iommu@lists.linux-foundation.org, linux-mediatek@lists.infradead.org, Matthias Brugger , ming-fan.chen@mediatek.com, Robin Murphy , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 09, 2019 at 07:59:33PM +0800, Yong Wu wrote: > In the commit 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback > to enable clocks"), we use pm_runtime callback to enable/disable the smi > larb clocks. It will cause the larb's clock may not be disabled when > suspend. That is because device_prepare will call pm_runtime_get_noresume > which will keep the larb's PM runtime status still is active when suspend, > then it won't enter our pm_runtime suspend callback to disable the > corresponding clocks. > > This patch adds suspend pm_ops to force disable the clocks, Use "LATE" to > make sure it disable the larb's clocks after the multimedia devices. > > Fixes: 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks") > Signed-off-by: Anan Sun > Signed-off-by: Yong Wu > --- > base on v5.4-rc1. > --- > drivers/memory/mtk-smi.c | 4 ++++ > 1 file changed, 4 insertions(+) Applied, thanks. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 A2058C10F14 for ; Tue, 15 Oct 2019 12:31:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8234A20854 for ; Tue, 15 Oct 2019 12:31:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729425AbfJOMbA (ORCPT ); Tue, 15 Oct 2019 08:31:00 -0400 Received: from 8bytes.org ([81.169.241.247]:47552 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729160AbfJOMbA (ORCPT ); Tue, 15 Oct 2019 08:31:00 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 27D5E2DF; Tue, 15 Oct 2019 14:30:58 +0200 (CEST) Date: Tue, 15 Oct 2019 14:30:53 +0200 From: Joerg Roedel To: Yong Wu Cc: Matthias Brugger , Will Deacon , Evan Green , Robin Murphy , Tomasz Figa , linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, youlin.pei@mediatek.com, Nicolas Boichat , anan.sun@mediatek.com, ming-fan.chen@mediatek.com Subject: Re: [PATCH] memory: mtk-smi: Add PM suspend and resume ops Message-ID: <20191015123053.GA17570@8bytes.org> References: <1570622373-16413-1-git-send-email-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1570622373-16413-1-git-send-email-yong.wu@mediatek.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 09, 2019 at 07:59:33PM +0800, Yong Wu wrote: > In the commit 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback > to enable clocks"), we use pm_runtime callback to enable/disable the smi > larb clocks. It will cause the larb's clock may not be disabled when > suspend. That is because device_prepare will call pm_runtime_get_noresume > which will keep the larb's PM runtime status still is active when suspend, > then it won't enter our pm_runtime suspend callback to disable the > corresponding clocks. > > This patch adds suspend pm_ops to force disable the clocks, Use "LATE" to > make sure it disable the larb's clocks after the multimedia devices. > > Fixes: 4f0a1a1ae351 ("memory: mtk-smi: Invoke pm runtime_callback to enable clocks") > Signed-off-by: Anan Sun > Signed-off-by: Yong Wu > --- > base on v5.4-rc1. > --- > drivers/memory/mtk-smi.c | 4 ++++ > 1 file changed, 4 insertions(+) Applied, thanks.