From patchwork Sun Dec 25 21:26:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 13081541 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 AB97AC3DA7A for ; Sun, 25 Dec 2022 21:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231329AbiLYV0p (ORCPT ); Sun, 25 Dec 2022 16:26:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbiLYV0n (ORCPT ); Sun, 25 Dec 2022 16:26:43 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 833CB1010; Sun, 25 Dec 2022 13:26:42 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id t17so23044618eju.1; Sun, 25 Dec 2022 13:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/q0ndmNr0G5VO5mmrpAzqld+fYwSSkJR22yhfnom9II=; b=hZzER+iF+6hFcPJzUmNyCqQJO42nRu6a+rSLJdUpP4qgdSLC0kNAdio44GrPx2rp9s 7JW7lZSrypqXi/G5o6hCj8apS25LAMJhksaUUPytaSKi88V8H98y4cWDn9z1jUiEI+Js NFzHnJRIB6xFdV+pZQlrvUUYYbfwSyCVbmUFMxgLxXCKyMku5rBfEEU9rPIuVH1D7B5C Tgn3rNX4zOvZOZj+04gmtAhksU2ObGaiHPvEQQNSpN7hTYFKkrsTSXr5Er8nOhQLRhPa CfVFb9GnAXMDFgnt+MtVLTPDyknH3kJ2lNrApx1w0SH2x6Jx2r21caCKweEGr6Z/+7Ep yPVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/q0ndmNr0G5VO5mmrpAzqld+fYwSSkJR22yhfnom9II=; b=4K8DEhss9KTl3BjBktaNVbB8aFhWtTd6G95wAsOMpQNZ1mfG9ybnxhX+h6Z39I0JOr jLDCqRZ8QbuiStfxQMwDNLnd2XQrb+l4WtGl9hdmRyq6H8evWNxQiScrBSuVyIjbvRnf qIC6y8SKvRhDWnWuLl0uRuhnkeFoJLSBCTK/c8qtkNdmW8F/89fQdLZRrcAK4JHNSKhr DZhWJpd79cY01hz9+P4iVe0usTkxTFLTzYFAAcLc7dOhwVz9401IV3CD5O6nOe32bB1T nlog+6DSQNU/131QkSswQ1RWxQXf3TjQ4EnEwNt/GySvKdU0DNgHRNM+ZAZjFYt8Rpvo lOPg== X-Gm-Message-State: AFqh2kqAxGBaQpVRWOGeEwidg0hrw7aEi4RiYshkerm12gut0Tei3qWp lIdIYtfW1miaOnQob9Q+4nuJRiaTa9Y= X-Google-Smtp-Source: AMrXdXulU6HQ5AbjrG194lmk0/WASSPSZALAdNIlkF8e/aZPlXkPMtxRnnbn210+u+td80qyWroVAg== X-Received: by 2002:a17:906:374e:b0:7c1:f64:61f1 with SMTP id e14-20020a170906374e00b007c10f6461f1mr17775820ejc.45.1672003600942; Sun, 25 Dec 2022 13:26:40 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c23-c49f-b200-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c49f:b200::e63]) by smtp.googlemail.com with ESMTPSA id ku22-20020a170907789600b007c10d47e748sm4062567ejc.36.2022.12.25.13.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Dec 2022 13:26:40 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, jbrunet@baylibre.com, Martin Blumenstingl Subject: [PATCH v1 1/4] clk: meson: mpll: Switch from .round_rate to .determine_rate Date: Sun, 25 Dec 2022 22:26:29 +0100 Message-Id: <20221225212632.2760126-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221225212632.2760126-1-martin.blumenstingl@googlemail.com> References: <20221225212632.2760126-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch clk-mpll over to use .determine_rate. Signed-off-by: Martin Blumenstingl --- drivers/clk/meson/clk-mpll.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/clk/meson/clk-mpll.c b/drivers/clk/meson/clk-mpll.c index fc9df4860872..20255e129b37 100644 --- a/drivers/clk/meson/clk-mpll.c +++ b/drivers/clk/meson/clk-mpll.c @@ -87,16 +87,22 @@ static unsigned long mpll_recalc_rate(struct clk_hw *hw, return rate < 0 ? 0 : rate; } -static long mpll_round_rate(struct clk_hw *hw, - unsigned long rate, - unsigned long *parent_rate) +static int mpll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req) { struct clk_regmap *clk = to_clk_regmap(hw); struct meson_clk_mpll_data *mpll = meson_clk_mpll_data(clk); unsigned int sdm, n2; + long rate; + + params_from_rate(req->rate, req->best_parent_rate, &sdm, &n2, + mpll->flags); - params_from_rate(rate, *parent_rate, &sdm, &n2, mpll->flags); - return rate_from_params(*parent_rate, sdm, n2); + rate = rate_from_params(req->best_parent_rate, sdm, n2); + if (rate < 0) + return rate; + + req->rate = rate; + return 0; } static int mpll_set_rate(struct clk_hw *hw, @@ -157,13 +163,13 @@ static int mpll_init(struct clk_hw *hw) const struct clk_ops meson_clk_mpll_ro_ops = { .recalc_rate = mpll_recalc_rate, - .round_rate = mpll_round_rate, + .determine_rate = mpll_determine_rate, }; EXPORT_SYMBOL_GPL(meson_clk_mpll_ro_ops); const struct clk_ops meson_clk_mpll_ops = { .recalc_rate = mpll_recalc_rate, - .round_rate = mpll_round_rate, + .determine_rate = mpll_determine_rate, .set_rate = mpll_set_rate, .init = mpll_init, }; From patchwork Sun Dec 25 21:26:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 13081540 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 CC7C4C4708D for ; Sun, 25 Dec 2022 21:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231348AbiLYV0q (ORCPT ); Sun, 25 Dec 2022 16:26:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231140AbiLYV0o (ORCPT ); Sun, 25 Dec 2022 16:26:44 -0500 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55BF010F7; Sun, 25 Dec 2022 13:26:43 -0800 (PST) Received: by mail-ej1-x62e.google.com with SMTP id qk9so23046653ejc.3; Sun, 25 Dec 2022 13:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=u624ykL0rVa4TXbrwRaAQyInF1fSqtT2CkhukAfQEcQ=; b=f/MsTWFfmvfxD5qcKbMT7oSwdnOKOaRdPUMvgkI2Jq8dI4tvIFNTeHhXg9Bwd/ruae tzb+0N1eg5KRzMTTLUa+3EGQAe4FBSiyKw0PN09VvPKBp5z2cEQdgN1n/RZ67Pi3DxgX zqVP99Ebigki9FcU1vJEllBPWjXQoe1LCQ1giR/X5qmveAWPNFNdMtGyd80NfY9mcmXl 3YLoCn9h46stJVIgEukqaVwNM1AdsRrfOIHJHEbf2Z0R5rvnaR45bf7qxlW9rFZBoARu FTTr6DSfpszUmwVcM86NR9YW2Pvu10+gfzhcstH/oSgc2s1aIe4uq2SAQ4UwHla9mnzq DcoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u624ykL0rVa4TXbrwRaAQyInF1fSqtT2CkhukAfQEcQ=; b=oyp7jjSD6SHvw7qvkLa9Wp8eTlvS2SRhhPODwquePJw5ZwYiy5HaMsUrjOTJ8HBLgO XgWZoqrxrP5S7jX1+qr//isNYKms0AOmI008J/XGtRAmeuiEOn9OQoYvrEBG1idKRZP5 qtVoQRi6/84gOgWwX+EUl0IRKfmO9clKj11255g+TZJrKmuY/Bqf6xQlVtz6/UlECsvG a+UEol4zzRDoVONvj9+s7faPd42/1z7E+oY2WGWXIu+IAnB729y6MHWq4qa5p9VAbaDa r501EgBeLzwOeYlRKiEtU7rH+m3QPhci5YiqomcB/MzIs1Sad3YvX4iGqJ+Ndc228eqL hWXw== X-Gm-Message-State: AFqh2kq81TbVQ5pJwP+OZZmq+pRUranK+ECw+24mcSp4k1bv3ypWmITk LlBBeo/zEn3VTEcJxKllXZtpqyZ9nrk= X-Google-Smtp-Source: AMrXdXuCzu/HDHjuswM3QCZzhciUAtgvKrG9dMjbyMfkd/nCUrMHqfXuaTRTRxok7K/obbmNdWAs8g== X-Received: by 2002:a17:907:d604:b0:7ad:d62d:9d31 with SMTP id wd4-20020a170907d60400b007add62d9d31mr13566696ejc.67.1672003601830; Sun, 25 Dec 2022 13:26:41 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c23-c49f-b200-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c49f:b200::e63]) by smtp.googlemail.com with ESMTPSA id ku22-20020a170907789600b007c10d47e748sm4062567ejc.36.2022.12.25.13.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Dec 2022 13:26:41 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, jbrunet@baylibre.com, Martin Blumenstingl Subject: [PATCH v1 2/4] clk: meson: dualdiv: switch from .round_rate to .determine_rate Date: Sun, 25 Dec 2022 22:26:30 +0100 Message-Id: <20221225212632.2760126-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221225212632.2760126-1-martin.blumenstingl@googlemail.com> References: <20221225212632.2760126-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch clk-dualdiv over to use .determine_rate. Signed-off-by: Martin Blumenstingl --- drivers/clk/meson/clk-dualdiv.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/clk/meson/clk-dualdiv.c b/drivers/clk/meson/clk-dualdiv.c index c5ca23a5e3e8..feae49a8f6dc 100644 --- a/drivers/clk/meson/clk-dualdiv.c +++ b/drivers/clk/meson/clk-dualdiv.c @@ -86,18 +86,23 @@ __dualdiv_get_setting(unsigned long rate, unsigned long parent_rate, return (struct meson_clk_dualdiv_param *)&table[best_i]; } -static long meson_clk_dualdiv_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) +static int meson_clk_dualdiv_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct clk_regmap *clk = to_clk_regmap(hw); struct meson_clk_dualdiv_data *dualdiv = meson_clk_dualdiv_data(clk); - const struct meson_clk_dualdiv_param *setting = - __dualdiv_get_setting(rate, *parent_rate, dualdiv); + const struct meson_clk_dualdiv_param *setting; - if (!setting) - return meson_clk_dualdiv_recalc_rate(hw, *parent_rate); + setting = __dualdiv_get_setting(req->rate, req->best_parent_rate, + dualdiv); + if (setting) + req->rate = __dualdiv_param_to_rate(req->best_parent_rate, + setting); + else + req->rate = meson_clk_dualdiv_recalc_rate(hw, + req->best_parent_rate); - return __dualdiv_param_to_rate(*parent_rate, setting); + return 0; } static int meson_clk_dualdiv_set_rate(struct clk_hw *hw, unsigned long rate, @@ -122,7 +127,7 @@ static int meson_clk_dualdiv_set_rate(struct clk_hw *hw, unsigned long rate, const struct clk_ops meson_clk_dualdiv_ops = { .recalc_rate = meson_clk_dualdiv_recalc_rate, - .round_rate = meson_clk_dualdiv_round_rate, + .determine_rate = meson_clk_dualdiv_determine_rate, .set_rate = meson_clk_dualdiv_set_rate, }; EXPORT_SYMBOL_GPL(meson_clk_dualdiv_ops); From patchwork Sun Dec 25 21:26:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 13081539 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 930C2C4708E for ; Sun, 25 Dec 2022 21:26:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231360AbiLYV0r (ORCPT ); Sun, 25 Dec 2022 16:26:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231312AbiLYV0p (ORCPT ); Sun, 25 Dec 2022 16:26:45 -0500 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0669810FE; Sun, 25 Dec 2022 13:26:44 -0800 (PST) Received: by mail-ej1-x629.google.com with SMTP id u19so22998877ejm.8; Sun, 25 Dec 2022 13:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5KI4GVi+gdxgp2ZGUw6TN4YhL63JS7cfevWElXB6z0s=; b=k1dJC42zQSl4nfLJ3K+ztzbqAJDFEdIdZPy7L1D89hkbY9HXKlLJuFXxqcw+FK/TVV ORaWIG/HNaJQAbqAPyI+2xwzcx1ahZY8BJEoDP1sNYxx03NhCDNBQjPBeYlUjFko1CD/ 1UIgfoKNhvBPrVy0u3EwiUhk86D0GXglDirGyqsPUsgX3Hbv+3r3k35idjNm+A6EXBKo fSRIGXrsl5YQVLyIkXWZERnfTGb9NHOb316NquZAOWKF7AEOBy9GJ1o7Mf/aaU/F9nad WUKlGJE3AeozEso1BQe9/tOHkRtMwjM+VjGdnVcAPbrJhBv9SQHd8qBjduSmTpkxxCLt OFNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5KI4GVi+gdxgp2ZGUw6TN4YhL63JS7cfevWElXB6z0s=; b=Ur/FFQPQwIEyVkrBMwAPRZ+VDEcashd+CPWu6HFNQyM3rmwW8fCIF1F7PiJlo9baaI yqhslFwHi+9fL3nnXdVLBS8CPOV+Wcyz7tJBjEUmt0ESUplUu1bgcyhMqG6SP445FF4+ hd9Q4/3VbYqDv1jm5fzXhS9SBf7CrDINPxbn2Zm00cyyAoFGbbgHU3zNCTmPW8C6H8Iz W6CiQcHhwWcH+mTg8dDAvbdlK2iADEOiimxZN5uCiETJSoyyrUuoyMCWjZvZPJScGulR Ldf6GhIf2BxMpa/0W4BxmSV1OoLQ4hqJ9S2fF9BB/EAWY9/oHqRwkf4hoLosMpsxLyv5 mthQ== X-Gm-Message-State: AFqh2ko+OzmV/iH+BP9Znszv887sQBD+bH4WX6MD0qox0aTczwRc/D7X GtGvDbv2r/6NWIChCKYzAML86e1Vszg= X-Google-Smtp-Source: AMrXdXs+KZaDdvm9udYW4BX/Q7fJqqvrvx1jef2GpmyfmYMmtA8FXASDVeM8/iE11rZbyMM520xcFA== X-Received: by 2002:a17:906:2813:b0:829:59d5:e661 with SMTP id r19-20020a170906281300b0082959d5e661mr13997700ejc.29.1672003602528; Sun, 25 Dec 2022 13:26:42 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c23-c49f-b200-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c49f:b200::e63]) by smtp.googlemail.com with ESMTPSA id ku22-20020a170907789600b007c10d47e748sm4062567ejc.36.2022.12.25.13.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Dec 2022 13:26:42 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, jbrunet@baylibre.com, Martin Blumenstingl Subject: [PATCH v1 3/4] clk: meson: sclk-div: switch from .round_rate to .determine_rate Date: Sun, 25 Dec 2022 22:26:31 +0100 Message-Id: <20221225212632.2760126-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221225212632.2760126-1-martin.blumenstingl@googlemail.com> References: <20221225212632.2760126-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch sclk-div over to use .determine_rate. Signed-off-by: Martin Blumenstingl --- drivers/clk/meson/sclk-div.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/clk/meson/sclk-div.c b/drivers/clk/meson/sclk-div.c index 76d31c0a3342..d12c45c4c261 100644 --- a/drivers/clk/meson/sclk-div.c +++ b/drivers/clk/meson/sclk-div.c @@ -96,16 +96,17 @@ static int sclk_div_bestdiv(struct clk_hw *hw, unsigned long rate, return bestdiv; } -static long sclk_div_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *prate) +static int sclk_div_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct clk_regmap *clk = to_clk_regmap(hw); struct meson_sclk_div_data *sclk = meson_sclk_div_data(clk); int div; - div = sclk_div_bestdiv(hw, rate, prate, sclk); + div = sclk_div_bestdiv(hw, req->rate, &req->best_parent_rate, sclk); + req->rate = DIV_ROUND_UP_ULL((u64)req->best_parent_rate, div); - return DIV_ROUND_UP_ULL((u64)*prate, div); + return 0; } static void sclk_apply_ratio(struct clk_regmap *clk, @@ -237,7 +238,7 @@ static int sclk_div_init(struct clk_hw *hw) const struct clk_ops meson_sclk_div_ops = { .recalc_rate = sclk_div_recalc_rate, - .round_rate = sclk_div_round_rate, + .determine_rate = sclk_div_determine_rate, .set_rate = sclk_div_set_rate, .enable = sclk_div_enable, .disable = sclk_div_disable, From patchwork Sun Dec 25 21:26:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 13081542 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 E558CC53210 for ; Sun, 25 Dec 2022 21:27:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229445AbiLYV0r (ORCPT ); Sun, 25 Dec 2022 16:26:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231321AbiLYV0p (ORCPT ); Sun, 25 Dec 2022 16:26:45 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA29321BC; Sun, 25 Dec 2022 13:26:44 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id qk9so23046700ejc.3; Sun, 25 Dec 2022 13:26:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mS2mnfCDe8WfSbHmKHSJQj2MrPkmcqdFMVHuqcZiyk8=; b=E4mBLrjCAk8pk5rL+QRgcUmvps2R29MC3VaGBiwIw9+toDwRp5M4jlsenqTdLtq9Or 7hQI/3vT/bnEiAqmUzimN8PfM2Xb7nHplHXfwuhpbSrOpwjtqY33hWzux2IDJ3FiORwJ zll0s73BQqoZAD2+sFAcXAHAofcAoz9Li/s8au7yaqdm7SLot94eHeKyRwIZ8GyZ4vvy CU/KIf2EOu59AIPSIhSZQeZrSq+vffPZqgysvkQM9jHcOAef3mnIVbDWxNDzBWVTmPTv PyrVswKYtDf3qfSOgYjnJtKDFefnRFuIKZDkCsfNmY8/oC2h1jiuZiQkz3o3SBrEjHwi xsIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mS2mnfCDe8WfSbHmKHSJQj2MrPkmcqdFMVHuqcZiyk8=; b=M1FN/UOABMt7RSDCzJq3WAAL95sUqSwoHy5vYgEDHkCUU4vH25uSensjx50BV3Uvif snAH8vp7xjdmpzNhRWzPzOG/vWMFrpFUiDa+rfdOU+RcMNJBv6USkhup28UjDEDc2+CA m85IPTXfPU+HVOJMfRwvid2MvEP3otnEMnRmAK9qcSjg2fr4URFZRXOspib2g99iObrS RYm6TzqmDekctfltJn3uYmEpsN8KjV13ByR7C05SV2g+eqI4Wm+/11pE9GBoWjKgcGuZ KiEXVLpLmMXcRBiox8d4E8Q305YZsDxCh+Gbyy8wHanF7wpRhxaOd0Ekm/nkdo+RCDT3 ACaQ== X-Gm-Message-State: AFqh2kqbCcjstlLBpyilZkNA9P8DXwVSHYIuMWp8Y7OxuNZAQ8mtMaKv zeuyzjJo+t54FIHU5SeLfLE= X-Google-Smtp-Source: AMrXdXsRrd9q9OWeC8AnStIWOxpDaW977IsrARLPCsgjW7H43dn1dDU5swzaVavSTGLR0IJVptIGag== X-Received: by 2002:a17:906:264c:b0:7c0:cc81:3d94 with SMTP id i12-20020a170906264c00b007c0cc813d94mr14307502ejc.13.1672003603392; Sun, 25 Dec 2022 13:26:43 -0800 (PST) Received: from localhost.localdomain (dynamic-2a01-0c23-c49f-b200-0000-0000-0000-0e63.c23.pool.telefonica.de. [2a01:c23:c49f:b200::e63]) by smtp.googlemail.com with ESMTPSA id ku22-20020a170907789600b007c10d47e748sm4062567ejc.36.2022.12.25.13.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Dec 2022 13:26:42 -0800 (PST) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, jbrunet@baylibre.com, Martin Blumenstingl Subject: [PATCH v1 4/4] clk: meson: clk-cpu-dyndiv: switch from .round_rate to .determine_rate Date: Sun, 25 Dec 2022 22:26:32 +0100 Message-Id: <20221225212632.2760126-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221225212632.2760126-1-martin.blumenstingl@googlemail.com> References: <20221225212632.2760126-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org clk_ops.round_rate will be removed at some point. It's replacement is .determine_rate. Switch clk-cpu-dyndiv over to use .determine_rate. Signed-off-by: Martin Blumenstingl --- drivers/clk/meson/clk-cpu-dyndiv.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/clk/meson/clk-cpu-dyndiv.c b/drivers/clk/meson/clk-cpu-dyndiv.c index 36976927fe82..8778c149d26a 100644 --- a/drivers/clk/meson/clk-cpu-dyndiv.c +++ b/drivers/clk/meson/clk-cpu-dyndiv.c @@ -27,14 +27,13 @@ static unsigned long meson_clk_cpu_dyndiv_recalc_rate(struct clk_hw *hw, NULL, 0, data->div.width); } -static long meson_clk_cpu_dyndiv_round_rate(struct clk_hw *hw, - unsigned long rate, - unsigned long *prate) +static int meson_clk_cpu_dyndiv_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct clk_regmap *clk = to_clk_regmap(hw); struct meson_clk_cpu_dyndiv_data *data = meson_clk_cpu_dyndiv_data(clk); - return divider_round_rate(hw, rate, prate, NULL, data->div.width, 0); + return divider_determine_rate(hw, req, NULL, data->div.width, 0); } static int meson_clk_cpu_dyndiv_set_rate(struct clk_hw *hw, unsigned long rate, @@ -63,7 +62,7 @@ static int meson_clk_cpu_dyndiv_set_rate(struct clk_hw *hw, unsigned long rate, const struct clk_ops meson_clk_cpu_dyndiv_ops = { .recalc_rate = meson_clk_cpu_dyndiv_recalc_rate, - .round_rate = meson_clk_cpu_dyndiv_round_rate, + .determine_rate = meson_clk_cpu_dyndiv_determine_rate, .set_rate = meson_clk_cpu_dyndiv_set_rate, }; EXPORT_SYMBOL_GPL(meson_clk_cpu_dyndiv_ops);