All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: rjw@sisk.pl, swarren@nvidia.com, linaro-kernel@lists.linaro.org,
	patches@linaro.org, cpufreq@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	mturquette@linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/6] clk: Tegra: Add CPU0 clock driver
Date: Wed, 7 Aug 2013 23:24:45 +0530	[thread overview]
Message-ID: <CAKohpokK7F7tYJnisVjF=NCRb9zUjQNzrFdXs+QsPSb4oqyytA@mail.gmail.com> (raw)
In-Reply-To: <52028859.20008@wwwdotorg.org>

On 7 August 2013 23:18, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 08/07/2013 11:45 AM, Viresh Kumar wrote:
>> On 7 August 2013 23:08, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 08/07/2013 08:46 AM, Viresh Kumar wrote:
>>>> This patch adds CPU0's clk driver for Tegra. It will be used by the generic
>>>> cpufreq-cpu0 driver to get/set cpu clk.
>>>>
>>>> Most of the platform specific bits are picked from tegra-cpufreq.c.
>>>
>>> Hmmm. I'm not sure if it makes sense to represent this as a clock
>>> object; isn't this more of a virtual construct that manages the rate of
>>> the clock, rather than an actual clock? The actual clock already exists
>>> as "cpu".
>>
>> I see it as this: There is a clock in system for cpu, call it "cpu". Now we
>> must be able to provide get/set routines for it. A set should set the
>> frequency to whatever is asked for and should really worry about how
>> that is being set. This part is internal to "cpu" clk.
>
> Sure.
>
>> This is what cpufreq-cpu0 driver should expect and does. Current "cpu"
>> clock implemented doesn't provide this facility ? And so this wrapper
>> made sense to me.
>
> But the additional management logic on top of the raw clock is exactly
> what the cpufreq driver is for. This patch series is basically moving
> the cpufreq driver code inside the clock code instead.

Above "sure" didn't go very well with what you wrote here :)

The additional management that we are required to do isn't cpufreq
driver specific but cpu or platform specific. cpufreq shouldn't care
about how CPU's clock is set to a particular frequency, its headache
of CPU's clk driver instead. cpu is yet another device and so
clk_set_rate() must be enough to set its frequency....

There might be other frameworks that need to set frequency of this
device later on and surely we don't want to replicate such piece of
code to every user..

Does it make sense to you?

WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] clk: Tegra: Add CPU0 clock driver
Date: Wed, 7 Aug 2013 23:24:45 +0530	[thread overview]
Message-ID: <CAKohpokK7F7tYJnisVjF=NCRb9zUjQNzrFdXs+QsPSb4oqyytA@mail.gmail.com> (raw)
In-Reply-To: <52028859.20008@wwwdotorg.org>

On 7 August 2013 23:18, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 08/07/2013 11:45 AM, Viresh Kumar wrote:
>> On 7 August 2013 23:08, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 08/07/2013 08:46 AM, Viresh Kumar wrote:
>>>> This patch adds CPU0's clk driver for Tegra. It will be used by the generic
>>>> cpufreq-cpu0 driver to get/set cpu clk.
>>>>
>>>> Most of the platform specific bits are picked from tegra-cpufreq.c.
>>>
>>> Hmmm. I'm not sure if it makes sense to represent this as a clock
>>> object; isn't this more of a virtual construct that manages the rate of
>>> the clock, rather than an actual clock? The actual clock already exists
>>> as "cpu".
>>
>> I see it as this: There is a clock in system for cpu, call it "cpu". Now we
>> must be able to provide get/set routines for it. A set should set the
>> frequency to whatever is asked for and should really worry about how
>> that is being set. This part is internal to "cpu" clk.
>
> Sure.
>
>> This is what cpufreq-cpu0 driver should expect and does. Current "cpu"
>> clock implemented doesn't provide this facility ? And so this wrapper
>> made sense to me.
>
> But the additional management logic on top of the raw clock is exactly
> what the cpufreq driver is for. This patch series is basically moving
> the cpufreq driver code inside the clock code instead.

Above "sure" didn't go very well with what you wrote here :)

The additional management that we are required to do isn't cpufreq
driver specific but cpu or platform specific. cpufreq shouldn't care
about how CPU's clock is set to a particular frequency, its headache
of CPU's clk driver instead. cpu is yet another device and so
clk_set_rate() must be enough to set its frequency....

There might be other frameworks that need to set frequency of this
device later on and surely we don't want to replicate such piece of
code to every user..

Does it make sense to you?

  reply	other threads:[~2013-08-07 17:54 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 14:46 [PATCH 0/6] Tegra: Use cpufreq-cpu0 driver Viresh Kumar
2013-08-07 14:46 ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 1/6] clk: Tegra: Add CPU0 clock driver Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 16:44   ` Mike Turquette
2013-08-07 16:44     ` Mike Turquette
2013-08-07 16:44     ` Mike Turquette
2013-08-07 17:38   ` Stephen Warren
2013-08-07 17:38     ` Stephen Warren
2013-08-07 17:45     ` Viresh Kumar
2013-08-07 17:45       ` Viresh Kumar
2013-08-07 17:48       ` Stephen Warren
2013-08-07 17:48         ` Stephen Warren
2013-08-07 17:54         ` Viresh Kumar [this message]
2013-08-07 17:54           ` Viresh Kumar
2013-08-07 18:50           ` Stephen Warren
2013-08-07 18:50             ` Stephen Warren
2013-08-08  2:42             ` Viresh Kumar
2013-08-08  2:42               ` Viresh Kumar
2013-08-08 18:50               ` Stephen Warren
2013-08-08 18:50                 ` Stephen Warren
2013-08-09  3:19                 ` Viresh Kumar
2013-08-09  3:19                   ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 2/6] ARM: Tegra: Add CPU's OPPs for using cpufreq-cpu0 driver Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 17:42   ` Stephen Warren
2013-08-07 17:42     ` Stephen Warren
2013-08-07 18:06     ` Viresh Kumar
2013-08-07 18:06       ` Viresh Kumar
2013-08-07 18:55       ` Stephen Warren
2013-08-07 18:55         ` Stephen Warren
2013-08-08  2:57         ` Viresh Kumar
2013-08-08  2:57           ` Viresh Kumar
2013-08-08 18:55           ` Stephen Warren
2013-08-08 18:55             ` Stephen Warren
2013-08-08 13:58         ` Lucas Stach
2013-08-08 13:58           ` Lucas Stach
2013-08-08 13:58           ` Lucas Stach
2013-08-08 14:11           ` Viresh Kumar
2013-08-08 14:11             ` Viresh Kumar
2013-08-08 14:22             ` Lucas Stach
2013-08-08 14:22               ` Lucas Stach
2013-08-08 14:37               ` Viresh Kumar
2013-08-08 14:37                 ` Viresh Kumar
2013-08-08 15:52                 ` Nishanth Menon
2013-08-08 15:52                   ` Nishanth Menon
2013-08-08 15:52                   ` Nishanth Menon
2013-08-07 14:46 ` [PATCH 3/6] ARM: Tegra: Enable OPP library Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 17:43   ` Stephen Warren
2013-08-07 17:43     ` Stephen Warren
2013-08-07 18:08     ` Viresh Kumar
2013-08-07 18:08       ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 4/6] ARM: Tegra: defconfig: select cpufreq-cpu0 driver Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 5/6] ARM: Tegra: start using " Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 17:46   ` Stephen Warren
2013-08-07 17:46     ` Stephen Warren
2013-08-07 17:49     ` Viresh Kumar
2013-08-07 17:49       ` Viresh Kumar
2013-08-07 17:53       ` Stephen Warren
2013-08-07 17:53         ` Stephen Warren
2013-08-07 17:59         ` Viresh Kumar
2013-08-07 17:59           ` Viresh Kumar
2013-08-07 18:51           ` Stephen Warren
2013-08-07 18:51             ` Stephen Warren
2013-08-08  2:48             ` Viresh Kumar
2013-08-08  2:48               ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 6/6] cpufreq: Tegra: Remove tegra-cpufreq driver Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-08  8:31 ` [PATCH 0/6] Tegra: Use cpufreq-cpu0 driver Richard Zhao
2013-08-08  8:31   ` Richard Zhao
2013-08-08  8:33   ` Viresh Kumar
2013-08-08  8:33     ` Viresh Kumar

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='CAKohpokK7F7tYJnisVjF=NCRb9zUjQNzrFdXs+QsPSb4oqyytA@mail.gmail.com' \
    --to=viresh.kumar@linaro.org \
    --cc=cpufreq@vger.kernel.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=patches@linaro.org \
    --cc=rjw@sisk.pl \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.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.