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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 79B2FC433EF for ; Mon, 11 Apr 2022 12:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Cc:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QkVyKKC1J0s782roNSavtkkLC2M79VPCuG2wHWYuk9A=; b=w9WrH0+yYTZatI e+RQlGWXsN9KdRWvnu4NPhzjU7KJS3nzg5n8YDC5SbL8klLRl8oFkJ+pOKNC2/sAr0Re88/Raggxi ugC1qBkMTfVju607grR9xi/ifrBqw5viTRN4nzcPExpiQtOLp1LHqYgvnLMtju0YZns+r9P/Wk9tR ZLKnUICTIY6jFKwxsNg8GqbdSd/LEFAfSBQUMiLatrD88x9eBUENRIGMGqx/joBXPHYaXbzxOlfz7 nU7wkhcCcFkdwNKd+UYo4zpc6Ynxi8er3xml6weWo60AkfmQZIEsEyhdQnIwuOwu8zByoiXXPLz+9 7xTAJvXK19xGZbOI94vA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndt2C-008wzI-SW; Mon, 11 Apr 2022 12:20:44 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndt2A-008wxD-6H for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2022 12:20:43 +0000 Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ndt1s-0004DP-Bg; Mon, 11 Apr 2022 14:20:24 +0200 Message-ID: Subject: Re: [PATCH v0 07/10] phy: freescale: add Samsung HDMI PHY From: Lucas Stach To: Maxime Ripard Cc: Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Shawn Guo , NXP Linux Team , Fabio Estevam , Pengutronix Kernel Team , Robert Foss , Neil Armstrong , Andrzej Hajda , Vinod Koul , Kishon Vijay Abraham I , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, patchwork-lst@pengutronix.de Date: Mon, 11 Apr 2022 14:20:22 +0200 In-Reply-To: <20220411115922.luv2gyutdecvsxa3@houat> References: <20220406160123.1272911-1-l.stach@pengutronix.de> <20220406160123.1272911-8-l.stach@pengutronix.de> <20220411115922.luv2gyutdecvsxa3@houat> User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_052042_260407_06CF4A79 X-CRM114-Status: GOOD ( 18.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Maxime, Am Montag, dem 11.04.2022 um 13:59 +0200 schrieb Maxime Ripard: > Hi Lucas, > > On Wed, Apr 06, 2022 at 06:01:20PM +0200, Lucas Stach wrote: > > +static unsigned long phy_clk_recalc_rate(struct clk_hw *hw, > > + unsigned long parent_rate) > > +{ > > + struct fsl_samsung_hdmi_phy *phy = to_fsl_samsung_hdmi_phy(hw); > > + > > + if (!phy->cur_cfg) > > + return 0; > > + > > + return phy->cur_cfg->clk_rate; > > +} > > This means that the clock will return 0 at initialization, which will > throw the rate accounting in the CCF off. > > Returning 0 here isn't valid. Surely that phy has a default > configuration at boot that you could use to initialize a rate? > > See https://lore.kernel.org/linux-clk/20220408091037.2041955-1-maxime@cerno.tech/ Thanks for the hint. I don't know the full history of this and surely I can use the register reset defaults to initialize the clock rate, but it still seems odd. A powered down clock generator, like the PLL in this PHY, is not actually putting out a clock at any rate, so 0 for the rate seems natural, so it's kind of a bad pitfall if the CCF can't deal with that. Regards, Lucas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel