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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3755EC433EF for ; Mon, 11 Apr 2022 11:59:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245019AbiDKMBm (ORCPT ); Mon, 11 Apr 2022 08:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231547AbiDKMBk (ORCPT ); Mon, 11 Apr 2022 08:01:40 -0400 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7351E1AD92 for ; Mon, 11 Apr 2022 04:59:27 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id BD91C320208F; Mon, 11 Apr 2022 07:59:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 11 Apr 2022 07:59:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1649678365; x=1649764765; bh=0qJaiZk6qA srEaDmTUAGx++TIqfK79p9zce7kcZU8lk=; b=c8ZfBNdbOZ7JWXONVaRAFIwRJ0 IAZwVz9BvCu5buQAisI+tOp73hcSH7CKMB7qZq7C29xg0Y/+Ixntr3r3bnW4EF6Z WO2X2LT+E4FCGlTIPeuPeXoWn09HGxwg6u1b/XTrCw7EAx9bFcgqqFElwceF9rsE PjvF5mcc9oJcf/UQZFtNABpDDrZIfK4kaRjnwUE5Q0/DDDPY4eIkbM+r3t1JawSH L1d9fR9arrIuXyS41V1nVXbkB3NZQRBBciH6gmoFTVyfs52uydzBDurSr2CZhoCL Xih8FPntb7R9D1b39zkD73x3JSOnnKeIUm61dU3BBGrum9YAdU2woNgJygjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1649678365; x= 1649764765; bh=0qJaiZk6qAsrEaDmTUAGx++TIqfK79p9zce7kcZU8lk=; b=H DBAb8A1uIs4YtS4QeBTFI2ppSHZrxmkXoCN6Fs4DnlnoR2AxBxm4Jg+tg78QxZz2 ldhwdMWmWluO0Y6uMoOVaBRmabj3ppmYBiursfWE2XMvIfxXZjtotMALISiFqe2w +PLGSUbxNJZSlNqBIQeJRXAapqqLB4/sAVJqC4BzMGIf7y7aepZxuqKM36VBpMc1 DDGtsoz3fZ0cvl83sKaANHGgg9XSbKe0jX8QjVMmLljvLCobsXMcEmeqXiALXpSQ zaXzS0LiYfayuycfj4wgj2A6fL+fMCp8YqIVBU9/iDkhLJg2+ebC8IUgrjiPfnF5 gsAu/2OQYDqyPDGF6husw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekiedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepveevfeffudeviedtgeethffhteeuffetfeffvdehvedvheetteehvdelfffg jedvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 07:59:24 -0400 (EDT) Date: Mon, 11 Apr 2022 13:59:22 +0200 From: Maxime Ripard To: Lucas Stach 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 Subject: Re: [PATCH v0 07/10] phy: freescale: add Samsung HDMI PHY Message-ID: <20220411115922.luv2gyutdecvsxa3@houat> References: <20220406160123.1272911-1-l.stach@pengutronix.de> <20220406160123.1272911-8-l.stach@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gze2mcn7iv4mzkgz" Content-Disposition: inline In-Reply-To: <20220406160123.1272911-8-l.stach@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org --gze2mcn7iv4mzkgz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/ Maxime --gze2mcn7iv4mzkgz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYlQYGgAKCRDj7w1vZxhR xeBpAQCJcFWh2PVcJIOtynWxA1viOlH3w9X5no7GMk6bkiTkvgD7BJp9gmbCUMvt mGBDtMSqVlbzzUn4KoAnBisVHCZ4awI= =jPTb -----END PGP SIGNATURE----- --gze2mcn7iv4mzkgz-- 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 42C1EC433F5 for ; Mon, 11 Apr 2022 11:59:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 775CC10E05F; Mon, 11 Apr 2022 11:59:32 +0000 (UTC) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3A6D610E05F for ; Mon, 11 Apr 2022 11:59:30 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id BD91C320208F; Mon, 11 Apr 2022 07:59:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 11 Apr 2022 07:59:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1649678365; x=1649764765; bh=0qJaiZk6qA srEaDmTUAGx++TIqfK79p9zce7kcZU8lk=; b=c8ZfBNdbOZ7JWXONVaRAFIwRJ0 IAZwVz9BvCu5buQAisI+tOp73hcSH7CKMB7qZq7C29xg0Y/+Ixntr3r3bnW4EF6Z WO2X2LT+E4FCGlTIPeuPeXoWn09HGxwg6u1b/XTrCw7EAx9bFcgqqFElwceF9rsE PjvF5mcc9oJcf/UQZFtNABpDDrZIfK4kaRjnwUE5Q0/DDDPY4eIkbM+r3t1JawSH L1d9fR9arrIuXyS41V1nVXbkB3NZQRBBciH6gmoFTVyfs52uydzBDurSr2CZhoCL Xih8FPntb7R9D1b39zkD73x3JSOnnKeIUm61dU3BBGrum9YAdU2woNgJygjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1649678365; x= 1649764765; bh=0qJaiZk6qAsrEaDmTUAGx++TIqfK79p9zce7kcZU8lk=; b=H DBAb8A1uIs4YtS4QeBTFI2ppSHZrxmkXoCN6Fs4DnlnoR2AxBxm4Jg+tg78QxZz2 ldhwdMWmWluO0Y6uMoOVaBRmabj3ppmYBiursfWE2XMvIfxXZjtotMALISiFqe2w +PLGSUbxNJZSlNqBIQeJRXAapqqLB4/sAVJqC4BzMGIf7y7aepZxuqKM36VBpMc1 DDGtsoz3fZ0cvl83sKaANHGgg9XSbKe0jX8QjVMmLljvLCobsXMcEmeqXiALXpSQ zaXzS0LiYfayuycfj4wgj2A6fL+fMCp8YqIVBU9/iDkhLJg2+ebC8IUgrjiPfnF5 gsAu/2OQYDqyPDGF6husw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekiedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepveevfeffudeviedtgeethffhteeuffetfeffvdehvedvheetteehvdelfffg jedvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 07:59:24 -0400 (EDT) Date: Mon, 11 Apr 2022 13:59:22 +0200 From: Maxime Ripard To: Lucas Stach Subject: Re: [PATCH v0 07/10] phy: freescale: add Samsung HDMI PHY Message-ID: <20220411115922.luv2gyutdecvsxa3@houat> References: <20220406160123.1272911-1-l.stach@pengutronix.de> <20220406160123.1272911-8-l.stach@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gze2mcn7iv4mzkgz" Content-Disposition: inline In-Reply-To: <20220406160123.1272911-8-l.stach@pengutronix.de> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Pengutronix Kernel Team , Neil Armstrong , Shawn Guo , dri-devel@lists.freedesktop.org, Vinod Koul , Robert Foss , Kishon Vijay Abraham I , Andrzej Hajda , Rob Herring , NXP Linux Team , linux-phy@lists.infradead.org, Krzysztof Kozlowski , patchwork-lst@pengutronix.de, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" --gze2mcn7iv4mzkgz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/ Maxime --gze2mcn7iv4mzkgz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYlQYGgAKCRDj7w1vZxhR xeBpAQCJcFWh2PVcJIOtynWxA1viOlH3w9X5no7GMk6bkiTkvgD7BJp9gmbCUMvt mGBDtMSqVlbzzUn4KoAnBisVHCZ4awI= =jPTb -----END PGP SIGNATURE----- --gze2mcn7iv4mzkgz-- 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 F073AC433F5 for ; Mon, 11 Apr 2022 11:59:53 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XNibhrZ2yGra6P7xUaqN9XGvvZXc2zCtSC6jVLQze60=; b=dL0G0WO3ugyoQMK+v+fdcdrpLe xgPWGU2sVzQ7gc/ke3CMlnQ7KXrNCbC0YpWQuB16tc09YbeYjFpZjl9EoS8Y0jGHUIvqGbTZtjZhQ 32sdzJKv0KYdEDzlukagXSG6MnNx6VsfQvZDeFEQsA+VpeoL8A9P05KVzIRAHsvK3znpmqO49rlDi BzUACElasHEYmyO8iIaTtUHD6DWJTN6PqaIBOW74EuINc8/PT1wbpk9WuQaK0mxvuK5aYNKiwT113 G3eLz5WB5qj6YyF7CV4ZibuFyLF9N0Dn/MWoJ+cMJTEdAVY4D3immLniilJk+rSDTbuHHNEwqo7vA +xgkPx5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndsi1-008ote-CA; Mon, 11 Apr 2022 11:59:53 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndshi-008okn-Ds; Mon, 11 Apr 2022 11:59:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id BD91C320208F; Mon, 11 Apr 2022 07:59:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 11 Apr 2022 07:59:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1649678365; x=1649764765; bh=0qJaiZk6qA srEaDmTUAGx++TIqfK79p9zce7kcZU8lk=; b=c8ZfBNdbOZ7JWXONVaRAFIwRJ0 IAZwVz9BvCu5buQAisI+tOp73hcSH7CKMB7qZq7C29xg0Y/+Ixntr3r3bnW4EF6Z WO2X2LT+E4FCGlTIPeuPeXoWn09HGxwg6u1b/XTrCw7EAx9bFcgqqFElwceF9rsE PjvF5mcc9oJcf/UQZFtNABpDDrZIfK4kaRjnwUE5Q0/DDDPY4eIkbM+r3t1JawSH L1d9fR9arrIuXyS41V1nVXbkB3NZQRBBciH6gmoFTVyfs52uydzBDurSr2CZhoCL Xih8FPntb7R9D1b39zkD73x3JSOnnKeIUm61dU3BBGrum9YAdU2woNgJygjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1649678365; x= 1649764765; bh=0qJaiZk6qAsrEaDmTUAGx++TIqfK79p9zce7kcZU8lk=; b=H DBAb8A1uIs4YtS4QeBTFI2ppSHZrxmkXoCN6Fs4DnlnoR2AxBxm4Jg+tg78QxZz2 ldhwdMWmWluO0Y6uMoOVaBRmabj3ppmYBiursfWE2XMvIfxXZjtotMALISiFqe2w +PLGSUbxNJZSlNqBIQeJRXAapqqLB4/sAVJqC4BzMGIf7y7aepZxuqKM36VBpMc1 DDGtsoz3fZ0cvl83sKaANHGgg9XSbKe0jX8QjVMmLljvLCobsXMcEmeqXiALXpSQ zaXzS0LiYfayuycfj4wgj2A6fL+fMCp8YqIVBU9/iDkhLJg2+ebC8IUgrjiPfnF5 gsAu/2OQYDqyPDGF6husw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekiedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepveevfeffudeviedtgeethffhteeuffetfeffvdehvedvheetteehvdelfffg jedvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 07:59:24 -0400 (EDT) Date: Mon, 11 Apr 2022 13:59:22 +0200 From: Maxime Ripard To: Lucas Stach 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 Subject: Re: [PATCH v0 07/10] phy: freescale: add Samsung HDMI PHY Message-ID: <20220411115922.luv2gyutdecvsxa3@houat> References: <20220406160123.1272911-1-l.stach@pengutronix.de> <20220406160123.1272911-8-l.stach@pengutronix.de> MIME-Version: 1.0 In-Reply-To: <20220406160123.1272911-8-l.stach@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_045934_517844_93A192C1 X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7704864325131369352==" Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org --===============7704864325131369352== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gze2mcn7iv4mzkgz" Content-Disposition: inline --gze2mcn7iv4mzkgz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/ Maxime --gze2mcn7iv4mzkgz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYlQYGgAKCRDj7w1vZxhR xeBpAQCJcFWh2PVcJIOtynWxA1viOlH3w9X5no7GMk6bkiTkvgD7BJp9gmbCUMvt mGBDtMSqVlbzzUn4KoAnBisVHCZ4awI= =jPTb -----END PGP SIGNATURE----- --gze2mcn7iv4mzkgz-- --===============7704864325131369352== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy --===============7704864325131369352==-- 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 E7FA8C433F5 for ; Mon, 11 Apr 2022 12:01:14 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KTNExj8l3bPXM0nkq3/LX0qzpWwO95hnRgWtPtG2MfY=; b=JcgngfayQuTMET7TN8SLyxl3af pzeziSKiUorsUkZxEh4c0hyG40E4q3ih22BDC7Pobx3Vmiq23cgj1GgYrvH2jxeufA394VJikpT66 PwLvlL2o5Y7OIyYfeYylrINhi2jL9WgWcDlAtUBvI/xipwoEkNdTfK7ZRHliAAtnwWXuxb7qewJ6K FyBtJCs+R1UsADBwMZGbENF8olTKCNMgJssWhL793Zb3U+5g919TChPvuJk3N2Y5QWnSd768rl9LT diuyOhIwSHvfd4FaXv80YvmfLKwIl7lX8yBF/+YbLsLoBmyaE/zI3wafPtgztGGBi5adnZOfA9ZC/ yywVkb6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndshn-008opM-7A; Mon, 11 Apr 2022 11:59:39 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndshi-008okn-Ds; Mon, 11 Apr 2022 11:59:36 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id BD91C320208F; Mon, 11 Apr 2022 07:59:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 11 Apr 2022 07:59:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1649678365; x=1649764765; bh=0qJaiZk6qA srEaDmTUAGx++TIqfK79p9zce7kcZU8lk=; b=c8ZfBNdbOZ7JWXONVaRAFIwRJ0 IAZwVz9BvCu5buQAisI+tOp73hcSH7CKMB7qZq7C29xg0Y/+Ixntr3r3bnW4EF6Z WO2X2LT+E4FCGlTIPeuPeXoWn09HGxwg6u1b/XTrCw7EAx9bFcgqqFElwceF9rsE PjvF5mcc9oJcf/UQZFtNABpDDrZIfK4kaRjnwUE5Q0/DDDPY4eIkbM+r3t1JawSH L1d9fR9arrIuXyS41V1nVXbkB3NZQRBBciH6gmoFTVyfs52uydzBDurSr2CZhoCL Xih8FPntb7R9D1b39zkD73x3JSOnnKeIUm61dU3BBGrum9YAdU2woNgJygjg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1649678365; x= 1649764765; bh=0qJaiZk6qAsrEaDmTUAGx++TIqfK79p9zce7kcZU8lk=; b=H DBAb8A1uIs4YtS4QeBTFI2ppSHZrxmkXoCN6Fs4DnlnoR2AxBxm4Jg+tg78QxZz2 ldhwdMWmWluO0Y6uMoOVaBRmabj3ppmYBiursfWE2XMvIfxXZjtotMALISiFqe2w +PLGSUbxNJZSlNqBIQeJRXAapqqLB4/sAVJqC4BzMGIf7y7aepZxuqKM36VBpMc1 DDGtsoz3fZ0cvl83sKaANHGgg9XSbKe0jX8QjVMmLljvLCobsXMcEmeqXiALXpSQ zaXzS0LiYfayuycfj4wgj2A6fL+fMCp8YqIVBU9/iDkhLJg2+ebC8IUgrjiPfnF5 gsAu/2OQYDqyPDGF6husw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudekiedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepveevfeffudeviedtgeethffhteeuffetfeffvdehvedvheetteehvdelfffg jedvnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Apr 2022 07:59:24 -0400 (EDT) Date: Mon, 11 Apr 2022 13:59:22 +0200 From: Maxime Ripard To: Lucas Stach 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 Subject: Re: [PATCH v0 07/10] phy: freescale: add Samsung HDMI PHY Message-ID: <20220411115922.luv2gyutdecvsxa3@houat> References: <20220406160123.1272911-1-l.stach@pengutronix.de> <20220406160123.1272911-8-l.stach@pengutronix.de> MIME-Version: 1.0 In-Reply-To: <20220406160123.1272911-8-l.stach@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220411_045934_517844_93A192C1 X-CRM114-Status: GOOD ( 11.64 ) 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: multipart/mixed; boundary="===============7193113687416520711==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7193113687416520711== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gze2mcn7iv4mzkgz" Content-Disposition: inline --gze2mcn7iv4mzkgz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/ Maxime --gze2mcn7iv4mzkgz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYlQYGgAKCRDj7w1vZxhR xeBpAQCJcFWh2PVcJIOtynWxA1viOlH3w9X5no7GMk6bkiTkvgD7BJp9gmbCUMvt mGBDtMSqVlbzzUn4KoAnBisVHCZ4awI= =jPTb -----END PGP SIGNATURE----- --gze2mcn7iv4mzkgz-- --===============7193113687416520711== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7193113687416520711==--