Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2308044rwl; Thu, 6 Apr 2023 08:29:01 -0700 (PDT) X-Google-Smtp-Source: AKy350Zf2eZol22Tms0d+1dJMMHq6YMe17fgpqeVh0UGbINJkk8ya/DW8Ema1yiZIMZjHByzYI/R X-Received: by 2002:a17:90a:195c:b0:240:973d:b436 with SMTP id 28-20020a17090a195c00b00240973db436mr10966305pjh.49.1680794940915; Thu, 06 Apr 2023 08:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680794940; cv=none; d=google.com; s=arc-20160816; b=G0szFrdwFB6laev0pJXAf/bMhYMQ9ogli3PV86NqyYAphAVOblbNj389zywopfFVG2 MVq4jOWWgSxsXJ8cL0KGHv7vbF7vh4e2VvtOlLb2rCXf0NnoMHNsI+gmW5r8r857tiJ5 YC+Cr8OC7ww7dQsP9TbWmpxK1ZlXWQiCoWG60ehQr/8JSW0QAkfzmg4YUgPHDczTn0Ew LX6Y5LluC4CRatJdBhqOPP2onI+cNIazXnSThcJEwHg+d/IRiy+HCFLkOTxzdL4woeSi czho0ZFT75CfqF9ZBN9XkrM/23v3A8nmOSGXjzc8PZaEk+mLNhMonlajKNqA+OQ8UkHg PICg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=o77iL/oa9+UaptZYirM6y8kPFM2IJe9glWZiAM1gLTg=; b=GD3ZV8GYYz0qMnEfl5X3pPayBskMWv5F194Yl2dZZg6DeZVlbYAVY8BS5Z1WGl0I06 IiIN4m8iIzXp8Eq2SDlZN49SG1L5gGhH/DLZuJd+XiSdtkSnq+j6nbezuRMaFMnbU1pi fn3VHzKBBUMQKRq74uDz7guYtW+281bIDP834XpaTA4d5C/oaurTSJ+CfEPHg3V924Bo QDCP7rcTT7WvWjaE6M4ZiwBP5YY+VgAKHE5CAnWR7nQUcRvbc4nTPpH8m8D7bD7c3Qqx 1ajhHQ4VFmwLPLBJOJ38w9Gnrb3arMUvXolkNUPJuCgHUTrF3q46QYjjOyQ192E638Wy EdWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p15-20020a17090a4f0f00b0023f1072583asi1551034pjh.76.2023.04.06.08.28.49; Thu, 06 Apr 2023 08:29:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239269AbjDFPVa (ORCPT + 99 others); Thu, 6 Apr 2023 11:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233628AbjDFPV2 (ORCPT ); Thu, 6 Apr 2023 11:21:28 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0E45A93C5; Thu, 6 Apr 2023 08:21:24 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D7C211C0A; Thu, 6 Apr 2023 08:22:08 -0700 (PDT) Received: from [10.2.7.51] (stinger.cambridge.arm.com [10.2.7.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ADE653F762; Thu, 6 Apr 2023 08:21:17 -0700 (PDT) Message-ID: Date: Thu, 6 Apr 2023 16:21:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v3 36/65] clk: versatile: sp810: Add a determine_rate hook Content-Language: en-US To: Maxime Ripard Cc: Michael Turquette , Stephen Boyd , =?UTF-8?Q?Andreas_F=c3=a4rber?= , Manivannan Sadhasivam , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Max Filippov , Charles Keepax , Richard Fitzgerald , Maxime Coquelin , Alexandre Torgue , Luca Ceresoli , David Lechner , Sekhar Nori , Abel Vesa , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Matthias Brugger , Geert Uytterhoeven , Dinh Nguyen , Peter De Schrijver , Prashant Gaikwad , Thierry Reding , Jonathan Hunter , Ulf Hansson , Linus Walleij , David Airlie , Daniel Vetter , Vinod Koul , Kishon Vijay Abraham I , Alessandro Zummo , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Paul Cercueil , Orson Zhai , Baolin Wang , Chunyan Zhang , linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno , linux-arm-kernel@lists.infradead.org, linux-actions@lists.infradead.org, patches@opensource.cirrus.com, linux-stm32@st-md-mailman.stormreply.com, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, linux-rtc@vger.kernel.org, linux-sunxi@lists.linux.dev, alsa-devel@alsa-project.org, linux-mips@vger.kernel.org References: <20221018-clk-range-checks-fixes-v3-0-9a1358472d52@cerno.tech> <20221018-clk-range-checks-fixes-v3-36-9a1358472d52@cerno.tech> From: Pawel Moll In-Reply-To: <20221018-clk-range-checks-fixes-v3-36-9a1358472d52@cerno.tech> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/04/2023 11:11, Maxime Ripard wrote: > The Versatile sp810 "timerclken" clock implements a mux with a > set_parent hook, but doesn't provide a determine_rate implementation. > > This is a bit odd, since set_parent() is there to, as its name implies, > change the parent of a clock. Explanation of this mystery is pretty simple - the original patch: commit 6e973d2c438502dcf956e76305258ba7d1c7d1d3 Author: Pawel Moll Date: Thu Apr 18 18:23:22 2013 +0100 clk: vexpress: Add separate SP810 driver predates introduction of determine_rate to clk_ops... commit 71472c0c06cf9a3d1540762ea205654c584e3bc4 Author: James Hogan Date: Mon Jul 29 12:25:00 2013 +0100 clk: add support for clock reparent on set_rate and clearly no one (the author included ;-) bothered to have another look at this side of the driver. > And if it was an oversight, then we are at least explicit about our > behavior now and it can be further refined down the line. It's been one hell of a memory lane trip, but my recollection suggest that the main goal of the driver was simply initialisation of the mux to select the 1MHz parent, because the other option - 32kHz - just didn't make any sense whatsoever. And that would be the case on every single platform using SP810 I know (or at least: knew), so it's seems to me that making the state permanent, as you're suggesting (or I think you're suggesting?) it's the right thing to do. Thanks! Paweł