linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Will McVicker <willmcvicker@google.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Cc: Android Kernel <kernel-team@android.com>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>, ;
Subject: Re: [PATCH v3 1/2] [RFT] clk: samsung: add support for CPU clocks
Date: Thu, 14 Oct 2021 14:40:18 -0700	[thread overview]
Message-ID: <163424761868.1688384.7017177221097736499@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <CABYd82a7G7jAOMr=yjpkG6sbH+g0-r36NKSBwVEDZeEthuTTLA@mail.gmail.com>

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.

  reply	other threads:[~2021-10-14 21:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20211013221032eucas1p1d8e2fcc36d3f021aa86cb846df0ed6da@eucas1p1.samsung.com>
2021-10-13 22:10 ` [RFT PATCH v3 0/2] clk: samsung: add common support for CPU clocks Will McVicker
2021-10-13 22:10   ` [PATCH v3 1/2] [RFT] clk: samsung: add " Will McVicker
2021-10-14  1:49     ` Stephen Boyd
2021-10-14 19:35       ` Will McVicker
2021-10-14 21:40         ` Stephen Boyd [this message]
2021-10-15 14:36           ` Sylwester Nawrocki
2021-10-13 22:10   ` [PATCH v3 2/2] [RFT] clk: samsung: exynos5433: update apollo and atlas clock probing Will McVicker
2021-10-14  8:33   ` [RFT PATCH v3 0/2] clk: samsung: add common support for CPU clocks Marek Szyprowski
2021-10-14 19:46     ` Will McVicker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=163424761868.1688384.7017177221097736499@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=cw00.choi@samsung.com \
    --cc=kernel-team@android.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=s.nawrocki@samsung.com \
    --cc=tomasz.figa@gmail.com \
    --cc=willmcvicker@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).