All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Sivaprakash Murugesan <sivaprak@codeaurora.org>,
	Benjamin Li <benl@squareup.com>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH 3/5] clk: qcom: apcs-msm8916: Retrieve clock name from DT
Date: Tue, 29 Jun 2021 10:57:29 -0500	[thread overview]
Message-ID: <YNtC6YSt1r+hbhPV@yoga> (raw)
In-Reply-To: <20210629133658.GB32336@dragon>

On Tue 29 Jun 08:36 CDT 2021, Shawn Guo wrote:

> On Sun, Jun 27, 2021 at 05:28:34PM -0700, Stephen Boyd wrote:
> > Quoting Shawn Guo (2021-05-03 22:28:42)
> > > Unlike MSM8916 which has only one APCS clock, MSM8939 gets three for
> > > Cluster0 (little cores), Cluster1 (big cores) and CCI (Cache Coherent
> > > Interconnect).  Instead of hard coding APCS (and A53PLL) clock name,
> > > retrieve the name from DT, so that multiple APCS clocks can be
> > > registered.
> > > 
> > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > ---
> > >  drivers/clk/qcom/a53-pll.c      | 5 ++++-
> > >  drivers/clk/qcom/apcs-msm8916.c | 5 ++++-
> > >  2 files changed, 8 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/clk/qcom/a53-pll.c b/drivers/clk/qcom/a53-pll.c
> > > index 8614b0b0e82c..964f5ab7d02f 100644
> > > --- a/drivers/clk/qcom/a53-pll.c
> > > +++ b/drivers/clk/qcom/a53-pll.c
> > > @@ -42,6 +42,7 @@ static int qcom_a53pll_probe(struct platform_device *pdev)
> > >         struct clk_pll *pll;
> > >         void __iomem *base;
> > >         struct clk_init_data init = { };
> > > +       const char *clk_name = NULL;
> > >         int ret;
> > >  
> > >         pll = devm_kzalloc(dev, sizeof(*pll), GFP_KERNEL);
> > > @@ -66,7 +67,9 @@ static int qcom_a53pll_probe(struct platform_device *pdev)
> > >         pll->status_bit = 16;
> > >         pll->freq_tbl = a53pll_freq;
> > >  
> > > -       init.name = "a53pll";
> > > +       of_property_read_string(pdev->dev.of_node, "clock-output-names",
> > > +                               &clk_name);
> > 
> > Please no? Is there any use for this? Why not just generate the name as
> > a53pll@<MMIO ADDRESS>?
> 
> There is no other use for this than getting different names.  I will do
> what you suggest here.  Thanks!
> 

I have exactly the same problem with my two DP PHYs (in
phy_dp_clks_register()), so I'm in favor of us setting some sort of
standard for this (not for anyone to rely on, but to avoid everyone
coming up with their own scheme).

But unfortunately I don't have easy access to the phy block's base
address in phy_dp_clks_register().

Regards,
Bjorn

> Shawn
> 
> > 
> > > +       init.name = clk_name ? clk_name : "a53pll";
> > >         init.parent_names = (const char *[]){ "xo" };
> > >         init.num_parents = 1;
> > >         init.ops = &clk_pll_sr2_ops;

  reply	other threads:[~2021-06-29 15:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-04  5:28 [PATCH 0/5] Add MSM8939 APCS/A53PLL clock support Shawn Guo
2021-05-04  5:28 ` [PATCH 1/5] clk: qcom: apcs-msm8916: Flag a53mux instead of a53pll as critical Shawn Guo
2021-06-28  0:27   ` Stephen Boyd
2021-06-29  2:37     ` Shawn Guo
2021-05-04  5:28 ` [PATCH 2/5] dt-bindings: clock: update qcom,a53pll bindings for MSM8939 support Shawn Guo
2021-05-06 20:27   ` Rob Herring
2021-05-07  0:18     ` Shawn Guo
2021-05-04  5:28 ` [PATCH 3/5] clk: qcom: apcs-msm8916: Retrieve clock name from DT Shawn Guo
2021-06-28  0:28   ` Stephen Boyd
2021-06-29 13:36     ` Shawn Guo
2021-06-29 15:57       ` Bjorn Andersson [this message]
2021-06-29 20:23         ` Stephen Boyd
2021-06-29 20:39           ` Bjorn Andersson
2021-05-04  5:28 ` [PATCH 4/5] clk: qcom: a53-pll: Pass freq_tbl via match data Shawn Guo
2021-05-04  5:28 ` [PATCH 5/5] clk: qcom: a53-pll: Add MSM8939 a53pll clocks Shawn Guo
2021-06-28  0:24   ` Stephen Boyd
2021-06-21  6:37 ` [PATCH 0/5] Add MSM8939 APCS/A53PLL clock support Shawn Guo

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=YNtC6YSt1r+hbhPV@yoga \
    --to=bjorn.andersson@linaro.org \
    --cc=benl@squareup.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=sivaprak@codeaurora.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.