lkml.org 
[lkml]   [2021]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/2] [RFT] clk: samsung: add support for CPU clocks
From
Date
Quoting Will McVicker (2021-10-14 12:35:57)
> On Wed, Oct 13, 2021 at 6:49 PM Stephen Boyd <sboyd@kernel.org> wrote:
> >
> > Quoting Will McVicker (2021-10-13 15:10:19)
> > > 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!

>
> >
> > > + 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.

\
 
 \ /
  Last update: 2021-10-14 23:40    [W:0.714 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site