All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rhyland Klein <rklein@nvidia.com>
To: "Michael Turquette" <mturquette@baylibre.com>,
	"Emilio López" <emilio@elopez.com.ar>,
	"Stephen Boyd" <sboyd@codeaurora.org>
Cc: <linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: clk_register: Correctly initialize enable_count
Date: Thu, 11 Feb 2016 16:58:14 -0500	[thread overview]
Message-ID: <56BD03F6.1050907@nvidia.com> (raw)
In-Reply-To: <20160211213247.26445.28956@quark.deferred.io>

On 2/11/2016 4:32 PM, Michael Turquette wrote:
> Quoting Rhyland Klein (2016-02-10 10:34:16)
>> On 2/9/2016 9:56 PM, Emilio L=C3=B3pez wrote:
>>> Hi,
>>>
>>> El 09/02/16 a las 19:48, Rhyland Klein escribi=C3=B3:
>>>> When clocks are registered, they could be enabled already in
>>>> hardware. As of now, the enable count will start at 0. When this
>>>> happens, it means a clock is enabled and the framework doesn't know
>>>> that, so it will always report it as disabled.
...
>=20
> clk_disable_unused() handles the case where spurious clocks were left
> enabled by the bootloader and need to be gated. This sounds like the
> only thing you were after.
>=20
> We also have a case where clocks are gated by clk_disable_unused()
> because no driver has claimed them yet, but we really want those clocks
> to be left enabled. For example, clocks supplying DDR & CPU shouldn't be
> cut, ever. Alternatively, your bootloader put something on the display
> but your display controller module hasn't loaded yet. Cutting the clock
> isn't fatal but causes unnecessary screen flicker because the module has
> not loaded up.
>=20
> To solve those sets of problems there is the critical clocks and handoff
> clocks thread[0].
>=20
> [0] http://lkml.kernel.org/r/<1455225554-13267-1-git-send-email-mturquett=
e@baylibre.com>
>=20
> Best regards,
> Mike
>=20

Thanks. I agree the clk_disable_unused should clear up the situation I
was in. And the critical clocks and handoff logic should be useful. I am
sure we can make use of it once its in for Tegra support.

-rhyland

--=20
nvpublic

WARNING: multiple messages have this Message-ID (diff)
From: Rhyland Klein <rklein@nvidia.com>
To: "Michael Turquette" <mturquette@baylibre.com>,
	"Emilio López" <emilio@elopez.com.ar>,
	"Stephen Boyd" <sboyd@codeaurora.org>
Cc: <linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] clk: clk_register: Correctly initialize enable_count
Date: Thu, 11 Feb 2016 16:58:14 -0500	[thread overview]
Message-ID: <56BD03F6.1050907@nvidia.com> (raw)
In-Reply-To: <20160211213247.26445.28956@quark.deferred.io>

On 2/11/2016 4:32 PM, Michael Turquette wrote:
> Quoting Rhyland Klein (2016-02-10 10:34:16)
>> On 2/9/2016 9:56 PM, Emilio López wrote:
>>> Hi,
>>>
>>> El 09/02/16 a las 19:48, Rhyland Klein escribió:
>>>> When clocks are registered, they could be enabled already in
>>>> hardware. As of now, the enable count will start at 0. When this
>>>> happens, it means a clock is enabled and the framework doesn't know
>>>> that, so it will always report it as disabled.
...
> 
> clk_disable_unused() handles the case where spurious clocks were left
> enabled by the bootloader and need to be gated. This sounds like the
> only thing you were after.
> 
> We also have a case where clocks are gated by clk_disable_unused()
> because no driver has claimed them yet, but we really want those clocks
> to be left enabled. For example, clocks supplying DDR & CPU shouldn't be
> cut, ever. Alternatively, your bootloader put something on the display
> but your display controller module hasn't loaded yet. Cutting the clock
> isn't fatal but causes unnecessary screen flicker because the module has
> not loaded up.
> 
> To solve those sets of problems there is the critical clocks and handoff
> clocks thread[0].
> 
> [0] http://lkml.kernel.org/r/<1455225554-13267-1-git-send-email-mturquette@baylibre.com>
> 
> Best regards,
> Mike
> 

Thanks. I agree the clk_disable_unused should clear up the situation I
was in. And the critical clocks and handoff logic should be useful. I am
sure we can make use of it once its in for Tegra support.

-rhyland

-- 
nvpublic

  reply	other threads:[~2016-02-11 21:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 22:48 [PATCH] clk: clk_register: Correctly initialize enable_count Rhyland Klein
2016-02-10  2:56 ` Emilio López
2016-02-10 18:34   ` Rhyland Klein
2016-02-10 18:34     ` Rhyland Klein
2016-02-11 21:32     ` Michael Turquette
2016-02-11 21:32       ` Michael Turquette
2016-02-11 21:58       ` Rhyland Klein [this message]
2016-02-11 21:58         ` Rhyland Klein

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=56BD03F6.1050907@nvidia.com \
    --to=rklein@nvidia.com \
    --cc=emilio@elopez.com.ar \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@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.