From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754099AbcIBOPO (ORCPT ); Fri, 2 Sep 2016 10:15:14 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:36067 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753989AbcIBOPK (ORCPT ); Fri, 2 Sep 2016 10:15:10 -0400 Date: Fri, 2 Sep 2016 09:15:08 -0500 From: Rob Herring To: Shawn Lin Cc: Heiko Stuebner , Ulf Hansson , Adrian Hunter , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, Douglas Anderson , Ziyuan Xu , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] Documentation: mmc: sdhci-of-arasan: Add clk_syscon as an optional one Message-ID: <20160902141508.GA20303@rob-hp-laptop> References: <1472457779-7194-1-git-send-email-shawn.lin@rock-chips.com> <1472457779-7194-2-git-send-email-shawn.lin@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1472457779-7194-2-git-send-email-shawn.lin@rock-chips.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 29, 2016 at 04:02:56PM +0800, Shawn Lin wrote: > We introduced soc-ctl-syscon to do several things, for instance, update > baseclk or update clkmul, etc. In odrder to access this physical block, > we need to explicitly enable its clock. Currently we don't control this > clock as we always add a CLK_IGNORE_UNUSED flag for it to indicate that > we will not gate it even if not referenced. This is not a correct way since > it is a clock parenting from clk_ahb which is used by sdhci-of-arasan now. > Without enabling clk_ahb, the flag don't guarantee we could access > soc-ctl-syscon. Moreover, we can't find a reason not to gate clk_syscon > once we remove/power-down emmc controller. So let's add clk_syscon and > enable/disable it explicitly when needed. > > Signed-off-by: Shawn Lin > > --- > > Documentation/devicetree/bindings/mmc/arasan,sdhci.txt | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > index 3404afa..b04eb02 100644 > --- a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > +++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt > @@ -33,6 +33,9 @@ Optional Properties: > - clock-output-names: If specified, this will be the name of the card clock > which will be exposed by this device. Required if #clock-cells is > specified. > + - clock-names: From clock bindings: Although we treat clock-names as required > + property, there is still one, "clk_syscon", should be optional as it depends > + on whether we need to control soc-ctl-syscon or not. No. This doesn't look right to me. The syscon is a separate block and the clock for it belongs in the syscon node itself. Probably there needs to be some sort of ref counting in the syscon so it can do runtime-pm. Rob