All of lore.kernel.org
 help / color / mirror / Atom feed
From: <ilialin@codeaurora.org>
To: 'Stephen Boyd' <sboyd@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
	sboyd@codeaurora.org
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	rnayak@codeaurora.org, robh@kernel.org, will.deacon@arm.com,
	amit.kucheria@linaro.org, tfinkel@codeaurora.org,
	nicolas.dechesne@linaro.org, celster@codeaurora.org
Subject: RE: [PATCH v3 07/10] clk: qcom: clk-cpu-8996: Prepare PLLs on probe
Date: Tue, 20 Mar 2018 15:53:08 +0200	[thread overview]
Message-ID: <013c01d3c052$ca49ecd0$5eddc670$@codeaurora.org> (raw)
In-Reply-To: <152147821849.242365.7709382599118820578@swboyd.mtv.corp.google.com>



> -----Original Message-----
> From: Stephen Boyd <sboyd@kernel.org>
> Sent: Monday, March 19, 2018 18:50
> To: Ilia Lin <ilialin@codeaurora.org>; linux-arm-kernel@lists.infradead.org;
> linux-arm-msm@vger.kernel.org; linux-clk@vger.kernel.org;
> sboyd@codeaurora.org
> Cc: mark.rutland@arm.com; devicetree@vger.kernel.org;
> rnayak@codeaurora.org; robh@kernel.org; will.deacon@arm.com;
> amit.kucheria@linaro.org; tfinkel@codeaurora.org; ilialin@codeaurora.org;
> nicolas.dechesne@linaro.org; celster@codeaurora.org
> Subject: Re: [PATCH v3 07/10] clk: qcom: clk-cpu-8996: Prepare PLLs on probe
> 
> Quoting Ilia Lin (2018-02-14 05:59:49)
> > The PLLs must be prepared enabled during the probe to be accessible by
> > the OPPs. Otherwise an OPP may switch to non-enabled clock.
> 
> Sounds like an OPP problem.

And again, it could be solved by a platform specific cpufreq driver. Worth it?

> 
> >
> > Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
> > ---
> >  drivers/clk/qcom/clk-cpu-8996.c | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/qcom/clk-cpu-8996.c
> > b/drivers/clk/qcom/clk-cpu-8996.c index 854f327..b0a3b73 100644
> > --- a/drivers/clk/qcom/clk-cpu-8996.c
> > +++ b/drivers/clk/qcom/clk-cpu-8996.c
> > @@ -15,7 +15,7 @@
> >  #include <linux/module.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/regmap.h>
> > -
> > +#include <linux/clk-provider.h>
> 
> Please leave a newline between linux/* and local includes.

Will be changed in the next spin.

> 
> >  #include "clk-alpha-pll.h"
> >
> >  #define VCO(a, b, c) { \
> > @@ -376,6 +376,18 @@ struct clk_hw_clks {
> >         clk_alpha_pll_configure(&perfcl_alt_pll, regmap, &altpll_config);
> >         clk_alpha_pll_configure(&pwrcl_alt_pll, regmap,
> > &altpll_config);
> >
> > +       /* Enable all PLLs and alt PLLs */
> > +       clk_prepare_enable(pwrcl_alt_pll.clkr.hw.clk);
> > +       clk_prepare_enable(perfcl_alt_pll.clkr.hw.clk);
> > +       clk_prepare_enable(pwrcl_pll.clkr.hw.clk);
> > +       clk_prepare_enable(perfcl_pll.clkr.hw.clk);
> 
> And this can't be done by the cpufreq-dt driver?

Are you suggesting changing the cpufreq-dt as well?

> 
> > +
> > +       /* Set initial boot frequencies for power/perf PLLs */
> > +       clk_set_rate(pwrcl_alt_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(perfcl_alt_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(pwrcl_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(perfcl_pll.clkr.hw.clk, 652800000);
> 
> We have assigned rates in DT for this.

I assumed that the clock driver can live without the OPP table and any cpufreq driver. Or do you mean adding this as parameters for the kryocc DT node?

> 
> > +
> >         ret = clk_notifier_register(pwrcl_pmux.clkr.hw.clk, &pwrcl_pmux.nb);
> >         if (ret)
> >                 return ret;

WARNING: multiple messages have this Message-ID (diff)
From: <ilialin@codeaurora.org>
To: "'Stephen Boyd'" <sboyd@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<sboyd@codeaurora.org>
Cc: <mark.rutland@arm.com>, <devicetree@vger.kernel.org>,
	<rnayak@codeaurora.org>, <robh@kernel.org>, <will.deacon@arm.com>,
	<amit.kucheria@linaro.org>, <tfinkel@codeaurora.org>,
	<nicolas.dechesne@linaro.org>, <celster@codeaurora.org>
Subject: RE: [PATCH v3 07/10] clk: qcom: clk-cpu-8996: Prepare PLLs on probe
Date: Tue, 20 Mar 2018 15:53:08 +0200	[thread overview]
Message-ID: <013c01d3c052$ca49ecd0$5eddc670$@codeaurora.org> (raw)
In-Reply-To: <152147821849.242365.7709382599118820578@swboyd.mtv.corp.google.com>



> -----Original Message-----
> From: Stephen Boyd <sboyd@kernel.org>
> Sent: Monday, March 19, 2018 18:50
> To: Ilia Lin <ilialin@codeaurora.org>; =
linux-arm-kernel@lists.infradead.org;
> linux-arm-msm@vger.kernel.org; linux-clk@vger.kernel.org;
> sboyd@codeaurora.org
> Cc: mark.rutland@arm.com; devicetree@vger.kernel.org;
> rnayak@codeaurora.org; robh@kernel.org; will.deacon@arm.com;
> amit.kucheria@linaro.org; tfinkel@codeaurora.org; =
ilialin@codeaurora.org;
> nicolas.dechesne@linaro.org; celster@codeaurora.org
> Subject: Re: [PATCH v3 07/10] clk: qcom: clk-cpu-8996: Prepare PLLs on =
probe
>=20
> Quoting Ilia Lin (2018-02-14 05:59:49)
> > The PLLs must be prepared enabled during the probe to be accessible =
by
> > the OPPs. Otherwise an OPP may switch to non-enabled clock.
>=20
> Sounds like an OPP problem.

And again, it could be solved by a platform specific cpufreq driver. =
Worth it?

>=20
> >
> > Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
> > ---
> >  drivers/clk/qcom/clk-cpu-8996.c | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/qcom/clk-cpu-8996.c
> > b/drivers/clk/qcom/clk-cpu-8996.c index 854f327..b0a3b73 100644
> > --- a/drivers/clk/qcom/clk-cpu-8996.c
> > +++ b/drivers/clk/qcom/clk-cpu-8996.c
> > @@ -15,7 +15,7 @@
> >  #include <linux/module.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/regmap.h>
> > -
> > +#include <linux/clk-provider.h>
>=20
> Please leave a newline between linux/* and local includes.

Will be changed in the next spin.

>=20
> >  #include "clk-alpha-pll.h"
> >
> >  #define VCO(a, b, c) { \
> > @@ -376,6 +376,18 @@ struct clk_hw_clks {
> >         clk_alpha_pll_configure(&perfcl_alt_pll, regmap, =
&altpll_config);
> >         clk_alpha_pll_configure(&pwrcl_alt_pll, regmap,
> > &altpll_config);
> >
> > +       /* Enable all PLLs and alt PLLs */
> > +       clk_prepare_enable(pwrcl_alt_pll.clkr.hw.clk);
> > +       clk_prepare_enable(perfcl_alt_pll.clkr.hw.clk);
> > +       clk_prepare_enable(pwrcl_pll.clkr.hw.clk);
> > +       clk_prepare_enable(perfcl_pll.clkr.hw.clk);
>=20
> And this can't be done by the cpufreq-dt driver?

Are you suggesting changing the cpufreq-dt as well?

>=20
> > +
> > +       /* Set initial boot frequencies for power/perf PLLs */
> > +       clk_set_rate(pwrcl_alt_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(perfcl_alt_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(pwrcl_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(perfcl_pll.clkr.hw.clk, 652800000);
>=20
> We have assigned rates in DT for this.

I assumed that the clock driver can live without the OPP table and any =
cpufreq driver. Or do you mean adding this as parameters for the kryocc =
DT node?

>=20
> > +
> >         ret =3D clk_notifier_register(pwrcl_pmux.clkr.hw.clk, =
&pwrcl_pmux.nb);
> >         if (ret)
> >                 return ret;


WARNING: multiple messages have this Message-ID (diff)
From: ilialin@codeaurora.org (ilialin at codeaurora.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 07/10] clk: qcom: clk-cpu-8996: Prepare PLLs on probe
Date: Tue, 20 Mar 2018 15:53:08 +0200	[thread overview]
Message-ID: <013c01d3c052$ca49ecd0$5eddc670$@codeaurora.org> (raw)
In-Reply-To: <152147821849.242365.7709382599118820578@swboyd.mtv.corp.google.com>



> -----Original Message-----
> From: Stephen Boyd <sboyd@kernel.org>
> Sent: Monday, March 19, 2018 18:50
> To: Ilia Lin <ilialin@codeaurora.org>; linux-arm-kernel at lists.infradead.org;
> linux-arm-msm at vger.kernel.org; linux-clk at vger.kernel.org;
> sboyd at codeaurora.org
> Cc: mark.rutland at arm.com; devicetree at vger.kernel.org;
> rnayak at codeaurora.org; robh at kernel.org; will.deacon at arm.com;
> amit.kucheria at linaro.org; tfinkel at codeaurora.org; ilialin at codeaurora.org;
> nicolas.dechesne at linaro.org; celster at codeaurora.org
> Subject: Re: [PATCH v3 07/10] clk: qcom: clk-cpu-8996: Prepare PLLs on probe
> 
> Quoting Ilia Lin (2018-02-14 05:59:49)
> > The PLLs must be prepared enabled during the probe to be accessible by
> > the OPPs. Otherwise an OPP may switch to non-enabled clock.
> 
> Sounds like an OPP problem.

And again, it could be solved by a platform specific cpufreq driver. Worth it?

> 
> >
> > Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
> > ---
> >  drivers/clk/qcom/clk-cpu-8996.c | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/qcom/clk-cpu-8996.c
> > b/drivers/clk/qcom/clk-cpu-8996.c index 854f327..b0a3b73 100644
> > --- a/drivers/clk/qcom/clk-cpu-8996.c
> > +++ b/drivers/clk/qcom/clk-cpu-8996.c
> > @@ -15,7 +15,7 @@
> >  #include <linux/module.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/regmap.h>
> > -
> > +#include <linux/clk-provider.h>
> 
> Please leave a newline between linux/* and local includes.

Will be changed in the next spin.

> 
> >  #include "clk-alpha-pll.h"
> >
> >  #define VCO(a, b, c) { \
> > @@ -376,6 +376,18 @@ struct clk_hw_clks {
> >         clk_alpha_pll_configure(&perfcl_alt_pll, regmap, &altpll_config);
> >         clk_alpha_pll_configure(&pwrcl_alt_pll, regmap,
> > &altpll_config);
> >
> > +       /* Enable all PLLs and alt PLLs */
> > +       clk_prepare_enable(pwrcl_alt_pll.clkr.hw.clk);
> > +       clk_prepare_enable(perfcl_alt_pll.clkr.hw.clk);
> > +       clk_prepare_enable(pwrcl_pll.clkr.hw.clk);
> > +       clk_prepare_enable(perfcl_pll.clkr.hw.clk);
> 
> And this can't be done by the cpufreq-dt driver?

Are you suggesting changing the cpufreq-dt as well?

> 
> > +
> > +       /* Set initial boot frequencies for power/perf PLLs */
> > +       clk_set_rate(pwrcl_alt_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(perfcl_alt_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(pwrcl_pll.clkr.hw.clk, 652800000);
> > +       clk_set_rate(perfcl_pll.clkr.hw.clk, 652800000);
> 
> We have assigned rates in DT for this.

I assumed that the clock driver can live without the OPP table and any cpufreq driver. Or do you mean adding this as parameters for the kryocc DT node?

> 
> > +
> >         ret = clk_notifier_register(pwrcl_pmux.clkr.hw.clk, &pwrcl_pmux.nb);
> >         if (ret)
> >                 return ret;

  reply	other threads:[~2018-03-20 13:53 UTC|newest]

Thread overview: 101+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 13:59 [PATCH v3 00/10] clk: qcom: CPU clock driver for msm8996 Ilia Lin
2018-02-14 13:59 ` Ilia Lin
2018-02-14 13:59 ` Ilia Lin
2018-02-14 13:59 ` [PATCH v3 01/10] soc: qcom: Separate kryo l2 accessors from PMU driver Ilia Lin
2018-02-14 13:59   ` Ilia Lin
2018-03-19 17:45   ` Stephen Boyd
2018-03-19 17:45     ` Stephen Boyd
2018-03-19 17:45     ` Stephen Boyd
2018-03-20 18:42     ` ilialin
2018-03-20 18:42       ` ilialin at codeaurora.org
2018-03-20 18:42       ` ilialin
2018-02-14 13:59 ` [PATCH v3 02/10] clk: qcom: Make clk_alpha_pll_configure available to modules Ilia Lin
2018-02-14 13:59   ` Ilia Lin
2018-02-14 13:59   ` Ilia Lin
2018-03-19 17:45   ` Stephen Boyd
2018-03-19 17:45     ` Stephen Boyd
2018-03-19 17:45     ` Stephen Boyd
2018-02-14 13:59 ` [PATCH v3 03/10] clk: qcom: Add CPU clock driver for msm8996 Ilia Lin
2018-02-14 13:59   ` Ilia Lin
2018-03-19 17:36   ` Stephen Boyd
2018-03-19 17:36     ` Stephen Boyd
2018-03-19 17:36     ` Stephen Boyd
2018-03-20 14:18     ` ilialin
2018-03-20 14:18       ` ilialin at codeaurora.org
2018-03-20 14:18       ` ilialin
2018-03-20 20:01       ` Stephen Boyd
2018-03-20 20:01         ` Stephen Boyd
2018-03-22 10:47     ` ilialin
2018-03-22 10:47       ` ilialin at codeaurora.org
2018-03-22 10:47       ` ilialin
2018-04-06 18:18       ` Stephen Boyd
2018-04-06 18:18         ` Stephen Boyd
2018-02-14 13:59 ` [PATCH v3 04/10] clk: qcom: Add DT bindings for " Ilia Lin
2018-02-14 13:59   ` Ilia Lin
2018-02-19  3:12   ` Rob Herring
2018-02-19  3:12     ` Rob Herring
2018-02-19  3:12     ` Rob Herring
2018-03-19 17:46   ` Stephen Boyd
2018-03-19 17:46     ` Stephen Boyd
2018-03-19 17:46     ` Stephen Boyd
2018-03-20 18:43     ` ilialin
2018-03-20 18:43       ` ilialin at codeaurora.org
2018-03-20 18:43       ` ilialin
2018-02-14 13:59 ` [PATCH v3 06/10] clk: qcom: cpu-8996: Add support to switch below 600Mhz Ilia Lin
2018-02-14 13:59   ` Ilia Lin
2018-03-19 17:49   ` Stephen Boyd
2018-03-19 17:49     ` Stephen Boyd
2018-03-19 17:49     ` Stephen Boyd
2018-02-14 13:59 ` [PATCH v3 07/10] clk: qcom: clk-cpu-8996: Prepare PLLs on probe Ilia Lin
2018-02-14 13:59   ` Ilia Lin
2018-03-19 16:50   ` Stephen Boyd
2018-03-19 16:50     ` Stephen Boyd
2018-03-19 16:50     ` Stephen Boyd
2018-03-20 13:53     ` ilialin [this message]
2018-03-20 13:53       ` ilialin at codeaurora.org
2018-03-20 13:53       ` ilialin
2018-03-20 20:03       ` Stephen Boyd
2018-03-20 20:03         ` Stephen Boyd
2018-02-14 13:59 ` [PATCH v3 08/10] clk: qcom: Add ACD path to CPU clock driver for msm8996 Ilia Lin
2018-02-14 13:59   ` Ilia Lin
2018-03-19 16:57   ` Stephen Boyd
2018-03-19 16:57     ` Stephen Boyd
2018-03-19 18:16     ` Robin Murphy
2018-03-19 18:16       ` Robin Murphy
2018-03-19 18:16       ` Robin Murphy
2018-03-19 21:21       ` Stephen Boyd
2018-03-19 21:21         ` Stephen Boyd
2018-03-22 18:56         ` Robin Murphy
2018-03-22 18:56           ` Robin Murphy
2018-03-20 14:04     ` ilialin
2018-03-20 14:04       ` ilialin at codeaurora.org
2018-03-20 14:04       ` ilialin
2018-03-20 20:04       ` Stephen Boyd
2018-03-20 20:04         ` Stephen Boyd
     [not found] ` <1518616792-29028-1-git-send-email-ilialin-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-02-14 13:59   ` [PATCH v3 05/10] clk: qcom: cpu-8996: Add support to switch to alternate PLL Ilia Lin
2018-02-14 13:59     ` Ilia Lin
2018-02-14 13:59     ` Ilia Lin
2018-03-19 17:47     ` Stephen Boyd
2018-03-19 17:47       ` Stephen Boyd
2018-03-19 17:47       ` Stephen Boyd
2018-03-20 18:45       ` ilialin
2018-03-20 18:45         ` ilialin at codeaurora.org
2018-03-20 18:45         ` ilialin
2018-02-14 13:59   ` [PATCH v3 09/10] DT: QCOM: Add cpufreq-dt to msm8996 Ilia Lin
2018-02-14 13:59     ` Ilia Lin
2018-02-14 13:59     ` Ilia Lin
2018-03-19 16:48     ` Stephen Boyd
2018-03-19 16:48       ` Stephen Boyd
2018-03-19 16:48       ` Stephen Boyd
2018-03-20 13:46       ` ilialin
2018-03-20 13:46         ` ilialin at codeaurora.org
2018-03-20 13:46         ` ilialin
2018-03-20 20:06         ` Stephen Boyd
2018-03-20 20:06           ` Stephen Boyd
2018-03-20 20:34           ` ilialin
2018-03-20 20:34             ` ilialin at codeaurora.org
2018-03-20 20:34             ` ilialin
2018-03-20 21:46             ` Stephen Boyd
2018-03-20 21:46               ` Stephen Boyd
2018-02-14 13:59 ` [PATCH v3 10/10] DT: QCOM: Add thermal mitigation " Ilia Lin
2018-02-14 13:59   ` Ilia Lin

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='013c01d3c052$ca49ecd0$5eddc670$@codeaurora.org' \
    --to=ilialin@codeaurora.org \
    --cc=amit.kucheria@linaro.org \
    --cc=celster@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nicolas.dechesne@linaro.org \
    --cc=rnayak@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sboyd@kernel.org \
    --cc=tfinkel@codeaurora.org \
    --cc=will.deacon@arm.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 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.