* [PATCH v2 01/12] clk: add new flag CLK_ROUNDING_NOOP
2026-03-09 14:38 [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Brian Masney
@ 2026-03-09 14:38 ` Brian Masney
2026-04-29 2:15 ` Stephen Boyd
2026-03-09 14:38 ` [PATCH v2 04/12] clk: scpi: drop determine_rate op and use CLK_ROUNDING_NOOP flag Brian Masney
` (4 subsequent siblings)
5 siblings, 1 reply; 10+ messages in thread
From: Brian Masney @ 2026-03-09 14:38 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Brian Masney, Sudeep Holla, Abel Vesa,
Andrea della Porta, Baolin Wang, Bjorn Andersson, Chanwoo Choi,
Frank Li, Geert Uytterhoeven, Krzysztof Kozlowski, Orson Zhai,
Sascha Hauer, Sylwester Nawrocki, Tudor Ambarus, Alim Akhtar,
arm-scmi, Chunyan Zhang, Cristian Marussi, Fabio Estevam, imx,
linux-arm-kernel, linux-arm-msm, linux-renesas-soc,
linux-samsung-soc, Peng Fan, Pengutronix Kernel Team
There are some clocks where the determine_rate clk op is just an empty
function that returns 0. This can be either because the rounding is
managed by the firmware, or the clock is capable of any rate. Add a
new flag for these type of clocks, and update the clk core so that the
determine_rate() clk op is not required when this flag is set.
Acked-by: Sudeep Holla <sudeep.holla@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
To: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>
To: Abel Vesa <abelvesa@kernel.org>
To: Andrea della Porta <andrea.porta@suse.com>
To: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Bjorn Andersson <andersson@kernel.org>
To: Chanwoo Choi <cw00.choi@samsung.com>
To: Frank Li <Frank.Li@nxp.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
To: Krzysztof Kozlowski <krzk@kernel.org>
To: Orson Zhai <orsonzhai@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
To: Sudeep Holla <sudeep.holla@kernel.org>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Tudor Ambarus <tudor.ambarus@linaro.org>
Cc: linux-clk@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: arm-scmi@vger.kernel.org
Cc: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
---
drivers/clk/clk.c | 31 ++++++++++++++++++++++++++++---
include/linux/clk-provider.h | 2 ++
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index fd418dc988b1c60c49e3ac9c0c44aa132dd5da28..1187e5b1dbc123d2d2c1f43690d7dcf75a7c4ac3 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1557,6 +1557,21 @@ static int __init clk_disable_unused(void)
}
late_initcall_sync(clk_disable_unused);
+/**
+ * clk_is_rounding_noop - Check to see if noop clk rounding is used.
+ *
+ * @core: the clk to check
+ *
+ * Clks that have this flag enabled do not need to have a determine_rate() op
+ * set, and will always return success for any rounding operation. This can be
+ * either because the rounding is managed by the firmware, or the clock is
+ * capable of any rate.
+ */
+static inline bool clk_is_rounding_noop(struct clk_core *core)
+{
+ return core->flags & CLK_ROUNDING_NOOP;
+}
+
static int clk_core_determine_round_nolock(struct clk_core *core,
struct clk_rate_request *req)
{
@@ -1589,6 +1604,8 @@ static int clk_core_determine_round_nolock(struct clk_core *core,
req->rate = core->rate;
} else if (core->ops->determine_rate) {
return core->ops->determine_rate(core->hw, req);
+ } else if (clk_is_rounding_noop(core)) {
+ return 0;
} else {
return -EINVAL;
}
@@ -1673,7 +1690,7 @@ EXPORT_SYMBOL_GPL(clk_hw_forward_rate_request);
static bool clk_core_can_round(struct clk_core * const core)
{
- return core->ops->determine_rate;
+ return core->ops->determine_rate || clk_is_rounding_noop(core);
}
static int clk_core_round_rate_nolock(struct clk_core *core,
@@ -3528,6 +3545,7 @@ static const struct {
ENTRY(CLK_IS_CRITICAL),
ENTRY(CLK_OPS_PARENT_ENABLE),
ENTRY(CLK_DUTY_CYCLE_PARENT),
+ ENTRY(CLK_ROUNDING_NOOP),
#undef ENTRY
};
@@ -3906,13 +3924,19 @@ static int __clk_core_init(struct clk_core *core)
/* check that clk_ops are sane. See Documentation/driver-api/clk.rst */
if (core->ops->set_rate && !core->ops->determine_rate &&
- core->ops->recalc_rate) {
+ core->ops->recalc_rate && !clk_is_rounding_noop(core)) {
pr_err("%s: %s must implement .determine_rate in addition to .recalc_rate\n",
__func__, core->name);
ret = -EINVAL;
goto out;
}
+ if (clk_is_rounding_noop(core) && core->ops->determine_rate) {
+ pr_err("%s: %s cannot implement both .determine_rate and CLK_ROUNDING_NOOP\n",
+ __func__, core->name);
+ goto out;
+ }
+
if (core->ops->set_parent && !core->ops->get_parent) {
pr_err("%s: %s must implement .get_parent & .set_parent\n",
__func__, core->name);
@@ -3920,7 +3944,8 @@ static int __clk_core_init(struct clk_core *core)
goto out;
}
- if (core->ops->set_parent && !core->ops->determine_rate) {
+ if (core->ops->set_parent && !core->ops->determine_rate &&
+ !clk_is_rounding_noop(core)) {
pr_err("%s: %s must implement .set_parent & .determine_rate\n",
__func__, core->name);
ret = -EINVAL;
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 1cda2c78dffaff037f0f16b0f11106b63b3a746f..33afef9403b526976af80881461bbfe1e4b76c77 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -32,6 +32,8 @@
#define CLK_OPS_PARENT_ENABLE BIT(12)
/* duty cycle call may be forwarded to the parent clock */
#define CLK_DUTY_CYCLE_PARENT BIT(13)
+/* clock rate rounding is managed by firmware, don't require determine_rate */
+#define CLK_ROUNDING_NOOP BIT(14)
struct clk;
struct clk_hw;
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 01/12] clk: add new flag CLK_ROUNDING_NOOP
2026-03-09 14:38 ` [PATCH v2 01/12] " Brian Masney
@ 2026-04-29 2:15 ` Stephen Boyd
2026-04-29 13:55 ` Brian Masney
0 siblings, 1 reply; 10+ messages in thread
From: Stephen Boyd @ 2026-04-29 2:15 UTC (permalink / raw)
To: Brian Masney, Michael Turquette
Cc: linux-clk, linux-kernel, Brian Masney, Sudeep Holla, Abel Vesa,
Andrea della Porta, Baolin Wang, Bjorn Andersson, Chanwoo Choi,
Frank Li, Geert Uytterhoeven, Krzysztof Kozlowski, Orson Zhai,
Sascha Hauer, Sylwester Nawrocki, Tudor Ambarus, Alim Akhtar,
arm-scmi, Chunyan Zhang, Cristian Marussi, Fabio Estevam, imx,
linux-arm-kernel, linux-arm-msm, linux-renesas-soc,
linux-samsung-soc, Peng Fan, Pengutronix Ker nel Team
Quoting Brian Masney (2026-03-09 07:38:40)
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index fd418dc988b1c60c49e3ac9c0c44aa132dd5da28..1187e5b1dbc123d2d2c1f43690d7dcf75a7c4ac3 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1673,7 +1690,7 @@ EXPORT_SYMBOL_GPL(clk_hw_forward_rate_request);
>
> static bool clk_core_can_round(struct clk_core * const core)
> {
> - return core->ops->determine_rate;
> + return core->ops->determine_rate || clk_is_rounding_noop(core);
> }
>
> static int clk_core_round_rate_nolock(struct clk_core *core,
> @@ -3528,6 +3545,7 @@ static const struct {
> ENTRY(CLK_IS_CRITICAL),
> ENTRY(CLK_OPS_PARENT_ENABLE),
> ENTRY(CLK_DUTY_CYCLE_PARENT),
> + ENTRY(CLK_ROUNDING_NOOP),
> #undef ENTRY
> };
>
> @@ -3906,13 +3924,19 @@ static int __clk_core_init(struct clk_core *core)
>
> /* check that clk_ops are sane. See Documentation/driver-api/clk.rst */
> if (core->ops->set_rate && !core->ops->determine_rate &&
> - core->ops->recalc_rate) {
> + core->ops->recalc_rate && !clk_is_rounding_noop(core)) {
> pr_err("%s: %s must implement .determine_rate in addition to .recalc_rate\n",
> __func__, core->name);
> ret = -EINVAL;
> goto out;
> }
>
> + if (clk_is_rounding_noop(core) && core->ops->determine_rate) {
> + pr_err("%s: %s cannot implement both .determine_rate and CLK_ROUNDING_NOOP\n",
> + __func__, core->name);
> + goto out;
> + }
> +
This hunk has me irked. I'd rather we export some function like
clk_determine_rate_noop() that just returns 0 instead of adding another
flag. The chance that someone can get it wrong goes down and you can
naturally grep for any clks that are using determine_rate() without
having to also include this flag in the grep. It makes it easier to
reason about as well because we can have code that just checks for
determine_rate presence instead of both (i.e. clk_core_can_round() isn't
changed). Plus a clk_ops structure is more self-contained because it
doesn't rely on the clk flags to go with it.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2 01/12] clk: add new flag CLK_ROUNDING_NOOP
2026-04-29 2:15 ` Stephen Boyd
@ 2026-04-29 13:55 ` Brian Masney
0 siblings, 0 replies; 10+ messages in thread
From: Brian Masney @ 2026-04-29 13:55 UTC (permalink / raw)
To: Stephen Boyd
Cc: Michael Turquette, linux-clk, linux-kernel, Sudeep Holla,
Abel Vesa, Andrea della Porta, Baolin Wang, Bjorn Andersson,
Chanwoo Choi, Frank Li, Geert Uytterhoeven, Krzysztof Kozlowski,
Orson Zhai, Sascha Hauer, Sylwester Nawrocki, Tudor Ambarus,
Alim Akhtar, arm-scmi, Chunyan Zhang, Cristian Marussi,
Fabio Estevam, imx, linux-arm-kernel, linux-arm-msm,
linux-renesas-soc, linux-samsung-soc, Peng Fan,
Pengutronix Kernel Team
On Tue, Apr 28, 2026 at 07:15:36PM -0700, Stephen Boyd wrote:
> Quoting Brian Masney (2026-03-09 07:38:40)
> > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> > index fd418dc988b1c60c49e3ac9c0c44aa132dd5da28..1187e5b1dbc123d2d2c1f43690d7dcf75a7c4ac3 100644
> > --- a/drivers/clk/clk.c
> > +++ b/drivers/clk/clk.c
> > @@ -1673,7 +1690,7 @@ EXPORT_SYMBOL_GPL(clk_hw_forward_rate_request);
> >
> > static bool clk_core_can_round(struct clk_core * const core)
> > {
> > - return core->ops->determine_rate;
> > + return core->ops->determine_rate || clk_is_rounding_noop(core);
> > }
> >
> > static int clk_core_round_rate_nolock(struct clk_core *core,
> > @@ -3528,6 +3545,7 @@ static const struct {
> > ENTRY(CLK_IS_CRITICAL),
> > ENTRY(CLK_OPS_PARENT_ENABLE),
> > ENTRY(CLK_DUTY_CYCLE_PARENT),
> > + ENTRY(CLK_ROUNDING_NOOP),
> > #undef ENTRY
> > };
> >
> > @@ -3906,13 +3924,19 @@ static int __clk_core_init(struct clk_core *core)
> >
> > /* check that clk_ops are sane. See Documentation/driver-api/clk.rst */
> > if (core->ops->set_rate && !core->ops->determine_rate &&
> > - core->ops->recalc_rate) {
> > + core->ops->recalc_rate && !clk_is_rounding_noop(core)) {
> > pr_err("%s: %s must implement .determine_rate in addition to .recalc_rate\n",
> > __func__, core->name);
> > ret = -EINVAL;
> > goto out;
> > }
> >
> > + if (clk_is_rounding_noop(core) && core->ops->determine_rate) {
> > + pr_err("%s: %s cannot implement both .determine_rate and CLK_ROUNDING_NOOP\n",
> > + __func__, core->name);
> > + goto out;
> > + }
> > +
>
> This hunk has me irked. I'd rather we export some function like
> clk_determine_rate_noop() that just returns 0 instead of adding another
> flag. The chance that someone can get it wrong goes down and you can
> naturally grep for any clks that are using determine_rate() without
> having to also include this flag in the grep. It makes it easier to
> reason about as well because we can have code that just checks for
> determine_rate presence instead of both (i.e. clk_core_can_round() isn't
> changed). Plus a clk_ops structure is more self-contained because it
> doesn't rely on the clk flags to go with it.
I also like the clk_determine_rate_noop() approach much better as well.
I'll send a new version.
Thanks,
Brian
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 04/12] clk: scpi: drop determine_rate op and use CLK_ROUNDING_NOOP flag
2026-03-09 14:38 [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Brian Masney
2026-03-09 14:38 ` [PATCH v2 01/12] " Brian Masney
@ 2026-03-09 14:38 ` Brian Masney
2026-03-09 14:38 ` [PATCH v2 06/12] clk: imx: scu: drop redundant init.ops variable assignment Brian Masney
` (3 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Brian Masney @ 2026-03-09 14:38 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Brian Masney, Sudeep Holla,
Cristian Marussi, arm-scmi, linux-arm-kernel
This clk driver has a noop determine_rate clk op. Drop this empty
function, and enable the CLK_ROUNDING_NOOP flag.
Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
To: Sudeep Holla <sudeep.holla@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Cc: arm-scmi@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-clk@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/clk/clk-scpi.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/clk/clk-scpi.c b/drivers/clk/clk-scpi.c
index 7806569cd0d5c4e32700edb10e4edf2185610a81..f5d0234ad4ad77e4333613139a8ee034b949d01f 100644
--- a/drivers/clk/clk-scpi.c
+++ b/drivers/clk/clk-scpi.c
@@ -32,18 +32,6 @@ static unsigned long scpi_clk_recalc_rate(struct clk_hw *hw,
return clk->scpi_ops->clk_get_val(clk->id);
}
-static int scpi_clk_determine_rate(struct clk_hw *hw,
- struct clk_rate_request *req)
-{
- /*
- * We can't figure out what rate it will be, so just return the
- * rate back to the caller. scpi_clk_recalc_rate() will be called
- * after the rate is set and we'll know what rate the clock is
- * running at then.
- */
- return 0;
-}
-
static int scpi_clk_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
@@ -54,7 +42,6 @@ static int scpi_clk_set_rate(struct clk_hw *hw, unsigned long rate,
static const struct clk_ops scpi_clk_ops = {
.recalc_rate = scpi_clk_recalc_rate,
- .determine_rate = scpi_clk_determine_rate,
.set_rate = scpi_clk_set_rate,
};
@@ -156,6 +143,7 @@ scpi_clk_ops_init(struct device *dev, const struct of_device_id *match,
if (IS_ERR(sclk->info))
return PTR_ERR(sclk->info);
} else if (init.ops == &scpi_clk_ops) {
+ init.flags |= CLK_ROUNDING_NOOP;
if (sclk->scpi_ops->clk_get_range(sclk->id, &min, &max) || !max)
return -EINVAL;
} else {
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 06/12] clk: imx: scu: drop redundant init.ops variable assignment
2026-03-09 14:38 [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Brian Masney
2026-03-09 14:38 ` [PATCH v2 01/12] " Brian Masney
2026-03-09 14:38 ` [PATCH v2 04/12] clk: scpi: drop determine_rate op and use CLK_ROUNDING_NOOP flag Brian Masney
@ 2026-03-09 14:38 ` Brian Masney
2026-03-09 14:38 ` [PATCH v2 07/12] clk: imx: scu: drop determine_rate op and use CLK_ROUNDING_NOOP flag Brian Masney
` (2 subsequent siblings)
5 siblings, 0 replies; 10+ messages in thread
From: Brian Masney @ 2026-03-09 14:38 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Brian Masney, Peng Fan, Abel Vesa,
Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
imx, linux-arm-kernel
The init.ops is assigned a default value, however right below it is an
if, else if, and else where all of them also assign a value to init.ops.
Drop the redundant init.ops assignment at the top.
Fixes: 3b9ea606cda53 ("clk: imx: scu: add cpu frequency scaling support")
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
To: Abel Vesa <abelvesa@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: linux-clk@vger.kernel.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
drivers/clk/imx/clk-scu.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index a85ec48a798b58a12f893587c85709bbd8476310..a39c68d664655537e81df55c7e6d32304de9338a 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -475,7 +475,6 @@ struct clk_hw *__imx_clk_scu(struct device *dev, const char *name,
clk->clk_type = clk_type;
init.name = name;
- init.ops = &clk_scu_ops;
if (rsrc_id == IMX_SC_R_A35 || rsrc_id == IMX_SC_R_A53 || rsrc_id == IMX_SC_R_A72)
init.ops = &clk_scu_cpu_ops;
else if (rsrc_id == IMX_SC_R_PI_0_PLL)
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 07/12] clk: imx: scu: drop determine_rate op and use CLK_ROUNDING_NOOP flag
2026-03-09 14:38 [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Brian Masney
` (2 preceding siblings ...)
2026-03-09 14:38 ` [PATCH v2 06/12] clk: imx: scu: drop redundant init.ops variable assignment Brian Masney
@ 2026-03-09 14:38 ` Brian Masney
2026-03-11 11:50 ` [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Tudor Ambarus
2026-04-28 20:38 ` Brian Masney
5 siblings, 0 replies; 10+ messages in thread
From: Brian Masney @ 2026-03-09 14:38 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Brian Masney, Peng Fan, Abel Vesa,
Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
imx, linux-arm-kernel
This clk driver has a noop determine_rate clk op. Drop this empty
function, and enable the CLK_ROUNDING_NOOP flag.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>
---
To: Abel Vesa <abelvesa@kernel.org>
To: Michael Turquette <mturquette@baylibre.com>
To: Stephen Boyd <sboyd@kernel.org>
To: Frank Li <Frank.Li@nxp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Pengutronix Kernel Team <kernel@pengutronix.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: linux-clk@vger.kernel.org
Cc: imx@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
drivers/clk/imx/clk-scu.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index a39c68d664655537e81df55c7e6d32304de9338a..13fb77562b031bb82d6fa2d19f9092ed33966aa4 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -262,23 +262,6 @@ static unsigned long clk_scu_recalc_rate(struct clk_hw *hw,
return le32_to_cpu(msg.data.resp.rate);
}
-/*
- * clk_scu_determine_rate - Returns the closest rate for a SCU clock
- * @hw: clock to round rate for
- * @req: clock rate request
- *
- * Returns 0 on success, a negative error on failure
- */
-static int clk_scu_determine_rate(struct clk_hw *hw,
- struct clk_rate_request *req)
-{
- /*
- * Assume we support all the requested rate and let the SCU firmware
- * to handle the left work
- */
- return 0;
-}
-
static int clk_scu_atf_set_cpu_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
@@ -436,7 +419,6 @@ static void clk_scu_unprepare(struct clk_hw *hw)
static const struct clk_ops clk_scu_ops = {
.recalc_rate = clk_scu_recalc_rate,
- .determine_rate = clk_scu_determine_rate,
.set_rate = clk_scu_set_rate,
.get_parent = clk_scu_get_parent,
.set_parent = clk_scu_set_parent,
@@ -446,7 +428,6 @@ static const struct clk_ops clk_scu_ops = {
static const struct clk_ops clk_scu_cpu_ops = {
.recalc_rate = clk_scu_recalc_rate,
- .determine_rate = clk_scu_determine_rate,
.set_rate = clk_scu_atf_set_cpu_rate,
.prepare = clk_scu_prepare,
.unprepare = clk_scu_unprepare,
@@ -454,7 +435,6 @@ static const struct clk_ops clk_scu_cpu_ops = {
static const struct clk_ops clk_scu_pi_ops = {
.recalc_rate = clk_scu_recalc_rate,
- .determine_rate = clk_scu_determine_rate,
.set_rate = clk_scu_set_rate,
};
@@ -491,7 +471,7 @@ struct clk_hw *__imx_clk_scu(struct device *dev, const char *name,
* clock status from HW instead of using the possible invalid
* cached rate.
*/
- init.flags = CLK_GET_RATE_NOCACHE;
+ init.flags = CLK_GET_RATE_NOCACHE | CLK_ROUNDING_NOOP;
clk->hw.init = &init;
hw = &clk->hw;
--
2.53.0
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP
2026-03-09 14:38 [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Brian Masney
` (3 preceding siblings ...)
2026-03-09 14:38 ` [PATCH v2 07/12] clk: imx: scu: drop determine_rate op and use CLK_ROUNDING_NOOP flag Brian Masney
@ 2026-03-11 11:50 ` Tudor Ambarus
2026-03-11 13:01 ` Brian Masney
2026-04-28 20:38 ` Brian Masney
5 siblings, 1 reply; 10+ messages in thread
From: Tudor Ambarus @ 2026-03-11 11:50 UTC (permalink / raw)
To: Brian Masney, Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Sudeep Holla, Abel Vesa,
Andrea della Porta, Baolin Wang, Bjorn Andersson, Chanwoo Choi,
Frank Li, Geert Uytterhoeven, Krzysztof Kozlowski, Orson Zhai,
Sascha Hauer, Sylwester Nawrocki, Alim Akhtar, arm-scmi,
Chunyan Zhang, Cristian Marussi, Fabio Estevam, imx,
linux-arm-kernel, linux-arm-msm, linux-renesas-soc,
linux-samsung-soc, Peng Fan, Pengutronix Kernel Team,
Dmitry Baryshkov, Krzysztof Kozlowski
Hi!
On 3/9/26 4:38 PM, Brian Masney wrote:
> Note this series depends on 3 previously-posted patches in this git pull
> to Stephen for v7.1.
> https://lore.kernel.org/linux-clk/aZuK4-QJCXUeSxtL@redhat.com/
There's no tags/clk-remove-deprecated-apis-v7.1 on
https://github.com/masneyb/linux
Cheers,
ta
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP
2026-03-11 11:50 ` [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Tudor Ambarus
@ 2026-03-11 13:01 ` Brian Masney
0 siblings, 0 replies; 10+ messages in thread
From: Brian Masney @ 2026-03-11 13:01 UTC (permalink / raw)
To: Tudor Ambarus
Cc: Michael Turquette, Stephen Boyd, linux-clk, linux-kernel,
Sudeep Holla, Abel Vesa, Andrea della Porta, Baolin Wang,
Bjorn Andersson, Chanwoo Choi, Frank Li, Geert Uytterhoeven,
Krzysztof Kozlowski, Orson Zhai, Sascha Hauer, Sylwester Nawrocki,
Alim Akhtar, arm-scmi, Chunyan Zhang, Cristian Marussi,
Fabio Estevam, imx, linux-arm-kernel, linux-arm-msm,
linux-renesas-soc, linux-samsung-soc, Peng Fan,
Pengutronix Kernel Team, Dmitry Baryshkov, Krzysztof Kozlowski
On Wed, Mar 11, 2026 at 7:51 AM Tudor Ambarus <tudor.ambarus@linaro.org> wrote:
> On 3/9/26 4:38 PM, Brian Masney wrote:
> > Note this series depends on 3 previously-posted patches in this git pull
> > to Stephen for v7.1.
> > https://lore.kernel.org/linux-clk/aZuK4-QJCXUeSxtL@redhat.com/
>
> There's no tags/clk-remove-deprecated-apis-v7.1 on
> https://github.com/masneyb/linux
It is here, unless I am missing something?
https://github.com/masneyb/linux/releases/tag/clk-remove-deprecated-apis-v7.1
Brian
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP
2026-03-09 14:38 [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Brian Masney
` (4 preceding siblings ...)
2026-03-11 11:50 ` [PATCH v2 00/12] clk: add new flag CLK_ROUNDING_NOOP Tudor Ambarus
@ 2026-04-28 20:38 ` Brian Masney
5 siblings, 0 replies; 10+ messages in thread
From: Brian Masney @ 2026-04-28 20:38 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd
Cc: linux-clk, linux-kernel, Sudeep Holla, Abel Vesa,
Andrea della Porta, Baolin Wang, Bjorn Andersson, Chanwoo Choi,
Frank Li, Geert Uytterhoeven, Krzysztof Kozlowski, Orson Zhai,
Sascha Hauer, Sylwester Nawrocki, Tudor Ambarus, Alim Akhtar,
arm-scmi, Chunyan Zhang, Cristian Marussi, Fabio Estevam, imx,
linux-arm-kernel, linux-arm-msm, linux-renesas-soc,
linux-samsung-soc, Peng Fan, Pengutronix Kernel Team,
Dmitry Baryshkov, Krzysztof Kozlowski
Hi Stephen,
On Mon, Mar 09, 2026 at 10:38:39AM -0400, Brian Masney wrote:
> There are some clocks where the determine_rate clk op is just an empty
> function that returns 0. This can be either because the rounding is
> managed by the firmware, or the clock is capable of any rate. Add a
> new flag for these type of clocks, and update the clk core so that the
> determine_rate() clk op is not required when this flag is set.
>
> Based on discussions with Stephen at Linux Plumbers Conference, he
> suggested adding a flag for this particular case. So let's add a new
> flag, and update the clk core so that the determine_rate() clk op is
> not required when this flag is set.
>
> This series adds the flag, some kunit tests, and updates all of the
> relevant drivers under drivers/clk to use the new flag.
>
> Once this is merged, and in Linus's tree, I can update the few remaining
> clk drivers that are outside of drivers/clk via those subsystems at a
> later time.
>
> Merge Strategy
> --------------
> All of this needs to be directly merged by Stephen as one series into
> his tree. Subsystem maintainers: please leave a Reviewed-by or Acked-by.
> To reduce the noise, I am only CCing people on their respective drivers.
>
> Note this series depends on 3 previously-posted patches in this git pull
> to Stephen for v7.1.
> https://lore.kernel.org/linux-clk/aZuK4-QJCXUeSxtL@redhat.com/
>
> Signed-off-by: Brian Masney <bmasney@redhat.com>
We talked about this change at LPC in Tokyo, and you were the one that
suggested adding a new flag. I initially wanted to add a new shared noop
function to drivers/clk/clk.c. This series implements everything we
talked about in person. The only thing that we didn't talk about in
person was the name of this new flag.
Anyways, let me know if you are interested in this change, and if you
want any changes. If there's no changes then would it be possible to
pick this up?
Thanks,
Brian
^ permalink raw reply [flat|nested] 10+ messages in thread