Thread (9 messages) 9 messages, 4 authors, 2021-10-15

Re: [PATCH v3 1/2] [RFT] clk: samsung: add support for CPU clocks

From: Stephen Boyd <sboyd@kernel.org>
Date: 2021-10-14 21:40:22
Also in: linux-clk, linux-samsung-soc, lkml

Quoting Will McVicker (2021-10-14 12:35:57)
On Wed, Oct 13, 2021 at 6:49 PM Stephen Boyd [off-list ref] wrote:
quoted
Quoting Will McVicker (2021-10-13 15:10:19)
quoted
diff --git a/drivers/clk/samsung/clk-cpu.c b/drivers/clk/samsung/clk-cpu.c
index 00ef4d1b0888..b5017934fc41 100644
--- a/drivers/clk/samsung/clk-cpu.c
+++ b/drivers/clk/samsung/clk-cpu.c
@@ -469,3 +469,29 @@ int __init exynos_register_cpu_clock(struct samsung_clk_provider *ctx,
        kfree(cpuclk);
        return ret;
 }
+
+void samsung_clk_register_cpu(struct samsung_clk_provider *ctx,
+               const struct samsung_cpu_clock *list, unsigned int nr_clk)
+{
+       unsigned int idx;
+       unsigned int num_cfgs;
+       struct clk *parent_clk, *alt_parent_clk;
+       const struct clk_hw *parent_clk_hw = NULL;
+       const struct clk_hw *alt_parent_clk_hw = NULL;
+
+       for (idx = 0; idx < nr_clk; idx++, list++) {
+               /* find count of configuration rates in cfg */
+               for (num_cfgs = 0; list->cfg[num_cfgs].prate != 0; )
+                       num_cfgs++;
+
+               parent_clk = __clk_lookup(list->parent_name);
Please stop using __clk_lookup()
Thanks, I believe I have a way around this. I'll fix this up in the
follow-up version.
Great!
quoted
quoted
+               if (parent_clk)
+                       parent_clk_hw = __clk_get_hw(parent_clk);
+               alt_parent_clk = __clk_lookup(list->alt_parent_name);
Can the DT binding be updated?
Are you referring to removing alt_parent and just adding it as another
parent clock?
I was wondering if this is an external clk that feeds into here or if it
is all internal to the clk controller. It sounds like it's all internal
to the clk controller? In which case a binding update isn't needed.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help