From: Vladimir Zapolskiy <vladimir_zapolskiy-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
To: Mikko Perttunen <mikko.perttunen-/1wQRMveznE@public.gmane.org>
Cc: swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org,
viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
pwalmsley-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
tuomas.tynkkynen-X3B1VOXEql0@public.gmane.org,
Tuomas Tynkkynen
<ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v5 03/16] clk: tegra: Add closed loop support for the DFLL
Date: Fri, 24 Oct 2014 18:13:30 +0300 [thread overview]
Message-ID: <544A6C9A.9050404@mentor.com> (raw)
In-Reply-To: <1414161563-16812-4-git-send-email-mikko.perttunen-/1wQRMveznE@public.gmane.org>
On 24.10.2014 17:39, Mikko Perttunen wrote:
> From: Tuomas Tynkkynen <ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> With closed loop support, the clock rate of the DFLL can be adjusted.
>
> The oscillator itself in the DFLL is a free-running oscillator whose
> rate is directly determined the supply voltage. However, the DFLL
> module contains logic to compare the DFLL output rate to a fixed
> reference clock (51 MHz) and make a decision to either lower or raise
> the DFLL supply voltage. The DFLL module can then autonomously change
> the supply voltage by communicating with an off-chip PMIC via either I2C
> or PWM signals. This driver currently supports only I2C.
>
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Mikko Perttunen <mikko.perttunen-/1wQRMveznE@public.gmane.org>
> ---
> drivers/clk/tegra/clk-dfll.c | 657 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 654 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> index 358c5d4..e71f4fb 100644
> --- a/drivers/clk/tegra/clk-dfll.c
> +++ b/drivers/clk/tegra/clk-dfll.c
[snip]
> +/**
> * dfll_fetch_common_params - read DFLL parameters from the device tree
> * @td: DFLL instance
> *
> @@ -923,6 +1563,13 @@ static int dfll_fetch_common_params(struct tegra_dfll *td)
> bool ok = true;
>
> ok &= read_dt_param(td, "nvidia,droop-ctrl", &td->droop_ctrl);
> + ok &= read_dt_param(td, "nvidia,sample-rate", &td->sample_rate);
> + ok &= read_dt_param(td, "nvidia,force-mode", &td->force_mode);
> + ok &= read_dt_param(td, "nvidia,cf", &td->cf);
> + ok &= read_dt_param(td, "nvidia,ci", &td->ci);
> + ok &= read_dt_param(td, "nvidia,cg", &td->cg);
> + td->cg_scale = of_property_read_bool(td->dev->of_node,
> + "nvidia,cg-scale");
Oh, I see here you exploit read_dt_param() intensively.
> if (of_property_read_string(td->dev->of_node, "clock-output-names",
> &td->output_clock_name)) {
> @@ -978,6 +1625,10 @@ int tegra_dfll_register(struct platform_device *pdev,
> return ret;
> }
>
> + ret = dfll_fetch_i2c_params(td);
> + if (ret)
> + return ret;
> +
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!mem) {
> dev_err(td->dev, "no control register resource\n");
>
--
With best wishes,
Vladimir
WARNING: multiple messages have this Message-ID (diff)
From: vladimir_zapolskiy@mentor.com (Vladimir Zapolskiy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 03/16] clk: tegra: Add closed loop support for the DFLL
Date: Fri, 24 Oct 2014 18:13:30 +0300 [thread overview]
Message-ID: <544A6C9A.9050404@mentor.com> (raw)
In-Reply-To: <1414161563-16812-4-git-send-email-mikko.perttunen@kapsi.fi>
On 24.10.2014 17:39, Mikko Perttunen wrote:
> From: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
>
> With closed loop support, the clock rate of the DFLL can be adjusted.
>
> The oscillator itself in the DFLL is a free-running oscillator whose
> rate is directly determined the supply voltage. However, the DFLL
> module contains logic to compare the DFLL output rate to a fixed
> reference clock (51 MHz) and make a decision to either lower or raise
> the DFLL supply voltage. The DFLL module can then autonomously change
> the supply voltage by communicating with an off-chip PMIC via either I2C
> or PWM signals. This driver currently supports only I2C.
>
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> Signed-off-by: Mikko Perttunen <mikko.perttunen@kapsi.fi>
> ---
> drivers/clk/tegra/clk-dfll.c | 657 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 654 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> index 358c5d4..e71f4fb 100644
> --- a/drivers/clk/tegra/clk-dfll.c
> +++ b/drivers/clk/tegra/clk-dfll.c
[snip]
> +/**
> * dfll_fetch_common_params - read DFLL parameters from the device tree
> * @td: DFLL instance
> *
> @@ -923,6 +1563,13 @@ static int dfll_fetch_common_params(struct tegra_dfll *td)
> bool ok = true;
>
> ok &= read_dt_param(td, "nvidia,droop-ctrl", &td->droop_ctrl);
> + ok &= read_dt_param(td, "nvidia,sample-rate", &td->sample_rate);
> + ok &= read_dt_param(td, "nvidia,force-mode", &td->force_mode);
> + ok &= read_dt_param(td, "nvidia,cf", &td->cf);
> + ok &= read_dt_param(td, "nvidia,ci", &td->ci);
> + ok &= read_dt_param(td, "nvidia,cg", &td->cg);
> + td->cg_scale = of_property_read_bool(td->dev->of_node,
> + "nvidia,cg-scale");
Oh, I see here you exploit read_dt_param() intensively.
> if (of_property_read_string(td->dev->of_node, "clock-output-names",
> &td->output_clock_name)) {
> @@ -978,6 +1625,10 @@ int tegra_dfll_register(struct platform_device *pdev,
> return ret;
> }
>
> + ret = dfll_fetch_i2c_params(td);
> + if (ret)
> + return ret;
> +
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!mem) {
> dev_err(td->dev, "no control register resource\n");
>
--
With best wishes,
Vladimir
WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
To: Mikko Perttunen <mikko.perttunen@kapsi.fi>
Cc: <swarren@wwwdotorg.org>, <thierry.reding@gmail.com>,
<gnurou@gmail.com>, <pdeschrijver@nvidia.com>,
<rjw@rjwysocki.net>, <viresh.kumar@linaro.org>,
<mturquette@linaro.org>, <pwalmsley@nvidia.com>,
<vinceh@nvidia.com>, <pgaikwad@nvidia.com>,
<linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>,
<linux-tegra@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <tuomas.tynkkynen@iki.fi>,
Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Subject: Re: [PATCH v5 03/16] clk: tegra: Add closed loop support for the DFLL
Date: Fri, 24 Oct 2014 18:13:30 +0300 [thread overview]
Message-ID: <544A6C9A.9050404@mentor.com> (raw)
In-Reply-To: <1414161563-16812-4-git-send-email-mikko.perttunen@kapsi.fi>
On 24.10.2014 17:39, Mikko Perttunen wrote:
> From: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
>
> With closed loop support, the clock rate of the DFLL can be adjusted.
>
> The oscillator itself in the DFLL is a free-running oscillator whose
> rate is directly determined the supply voltage. However, the DFLL
> module contains logic to compare the DFLL output rate to a fixed
> reference clock (51 MHz) and make a decision to either lower or raise
> the DFLL supply voltage. The DFLL module can then autonomously change
> the supply voltage by communicating with an off-chip PMIC via either I2C
> or PWM signals. This driver currently supports only I2C.
>
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> Signed-off-by: Mikko Perttunen <mikko.perttunen@kapsi.fi>
> ---
> drivers/clk/tegra/clk-dfll.c | 657 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 654 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> index 358c5d4..e71f4fb 100644
> --- a/drivers/clk/tegra/clk-dfll.c
> +++ b/drivers/clk/tegra/clk-dfll.c
[snip]
> +/**
> * dfll_fetch_common_params - read DFLL parameters from the device tree
> * @td: DFLL instance
> *
> @@ -923,6 +1563,13 @@ static int dfll_fetch_common_params(struct tegra_dfll *td)
> bool ok = true;
>
> ok &= read_dt_param(td, "nvidia,droop-ctrl", &td->droop_ctrl);
> + ok &= read_dt_param(td, "nvidia,sample-rate", &td->sample_rate);
> + ok &= read_dt_param(td, "nvidia,force-mode", &td->force_mode);
> + ok &= read_dt_param(td, "nvidia,cf", &td->cf);
> + ok &= read_dt_param(td, "nvidia,ci", &td->ci);
> + ok &= read_dt_param(td, "nvidia,cg", &td->cg);
> + td->cg_scale = of_property_read_bool(td->dev->of_node,
> + "nvidia,cg-scale");
Oh, I see here you exploit read_dt_param() intensively.
> if (of_property_read_string(td->dev->of_node, "clock-output-names",
> &td->output_clock_name)) {
> @@ -978,6 +1625,10 @@ int tegra_dfll_register(struct platform_device *pdev,
> return ret;
> }
>
> + ret = dfll_fetch_i2c_params(td);
> + if (ret)
> + return ret;
> +
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!mem) {
> dev_err(td->dev, "no control register resource\n");
>
--
With best wishes,
Vladimir
next prev parent reply other threads:[~2014-10-24 15:13 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 14:39 [PATCH v5 00/16] Tegra124 CL-DVFS / DFLL clocksource + cpufreq Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 01/16] clk: tegra: Add binding for the Tegra124 DFLL clocksource Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 02/16] clk: tegra: Add library for the DFLL clock source (open-loop mode) Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 15:08 ` Vladimir Zapolskiy
2014-10-24 15:08 ` Vladimir Zapolskiy
2014-10-24 15:08 ` Vladimir Zapolskiy
2014-10-27 9:36 ` Mikko Perttunen
2014-10-27 9:36 ` Mikko Perttunen
[not found] ` <1414161563-16812-3-git-send-email-mikko.perttunen-/1wQRMveznE@public.gmane.org>
2014-10-31 11:16 ` [PATCH v6 " Mikko Perttunen
2014-10-31 11:16 ` Mikko Perttunen
2014-10-31 11:16 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 03/16] clk: tegra: Add closed loop support for the DFLL Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
[not found] ` <1414161563-16812-4-git-send-email-mikko.perttunen-/1wQRMveznE@public.gmane.org>
2014-10-24 15:13 ` Vladimir Zapolskiy [this message]
2014-10-24 15:13 ` Vladimir Zapolskiy
2014-10-24 15:13 ` Vladimir Zapolskiy
2014-10-31 11:18 ` [PATCH v6 " Mikko Perttunen
2014-10-31 11:18 ` Mikko Perttunen
2014-10-31 11:18 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 04/16] clk: tegra: Add functions for parsing CVB tables Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 05/16] clk: tegra: Add DFLL DVCO reset control for Tegra124 Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 06/16] clk: tegra: Add Tegra124 DFLL clocksource platform driver Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
[not found] ` <1414161563-16812-1-git-send-email-mikko.perttunen-/1wQRMveznE@public.gmane.org>
2014-10-24 14:39 ` [PATCH v5 07/16] clk: tegra: Save/restore CCLKG_BURST_POLICY on suspend Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 08/16] clk: tegra: Add the DFLL as a possible parent of the cclk_g clock Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 09/16] ARM: tegra: Add the DFLL to Tegra124 device tree Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 10/16] ARM: tegra: Enable the DFLL on the Jetson TK1 Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 11/16] cpufreq: tegra124: Add device tree bindings Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 12/16] cpufreq: tegra: Rename tegra-cpufreq to tegra20-cpufreq Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-11-10 4:52 ` Viresh Kumar
2014-11-10 4:52 ` Viresh Kumar
2014-11-10 11:40 ` Mikko Perttunen
2014-11-10 11:40 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 13/16] cpufreq: Add cpufreq driver for Tegra124 Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 14/16] ARM: tegra: Add entries for cpufreq on Tegra124 Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 15/16] ARM: tegra: Add CPU regulator to the Jetson TK1 device tree Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 16/16] ARM: tegra: enable Tegra124 cpufreq driver by default Mikko Perttunen
2014-10-24 14:39 ` Mikko Perttunen
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=544A6C9A.9050404@mentor.com \
--to=vladimir_zapolskiy-nmggyn9qbj3qt0dzr+alfa@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mikko.perttunen-/1wQRMveznE@public.gmane.org \
--cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=pwalmsley-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ttynkkynen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=tuomas.tynkkynen-X3B1VOXEql0@public.gmane.org \
--cc=vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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.