All of lore.kernel.org
 help / color / mirror / Atom feed
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: respect the clock dependencies in of_clk_init
Date: Fri, 07 Feb 2014 16:12:47 +0100	[thread overview]
Message-ID: <52F4F7EF.7090900@free-electrons.com> (raw)
In-Reply-To: <52F4F502.2010703@elopez.com.ar>

On 07/02/2014 16:00, Emilio L?pez wrote:
> El 07/02/14 11:49, Gregory CLEMENT escribi?:
>> On 07/02/2014 15:43, Ezequiel Garcia wrote:
>>> On Fri, Feb 07, 2014 at 09:24:30AM -0500, Jason Cooper wrote:
>>>> On Fri, Feb 07, 2014 at 10:06:08AM -0300, Emilio L?pez wrote:
>>>>
>>>> [snip a great explanation]
>>>>
>>>> Guys, can I get some Tested-by's on this?
>>>>
>>>
>>> In case someone missed Emilio's comment about it, I gave his oneliner
>>> a test on A370 Reference Design. It worked just as well as Sebastian's.
>>
>> Well ok it's working but this patch is not better than Sebastian, it is
>> even worth. I don't think it is a good idea at all to totally ignore the
>> information given by the device tree.
> 
> With a bit more work, you can replace the clk_get magic with a call to 
> of_clk_get_parent_name() or similar to be able to keep overriding stuff 
> from DT. This way it would completely match the behaviour on 
> mvebu_coreclk_setup (default to "tclk", allow overriding with DT).
> 

I think you didn't have a look on our implementation: the name of the clock
are created by the driver during the initialization. That's why we need that
the parent clock are initialized before the gating clock. I know that for the
sunxi clock you choose to list all your clock name in the device tree, but we
didn't make this choice on purpose. It is not as trivial as you suggested.

I didn't have a look on the atmel clocks, and I don't know if they have this
kind of issue, as they also have to deal with multiple parents, they may
have different issues.

Gregory

> Emilio
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: "Emilio López" <emilio@elopez.com.ar>,
	"Ezequiel Garcia" <ezequiel.garcia@free-electrons.com>,
	"Jason Cooper" <jason@lakedaemon.net>
Cc: Mike Turquette <mturquette@linaro.org>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Andrew Lunn <andrew@lunn.ch>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH] clk: respect the clock dependencies in of_clk_init
Date: Fri, 07 Feb 2014 16:12:47 +0100	[thread overview]
Message-ID: <52F4F7EF.7090900@free-electrons.com> (raw)
In-Reply-To: <52F4F502.2010703@elopez.com.ar>

On 07/02/2014 16:00, Emilio López wrote:
> El 07/02/14 11:49, Gregory CLEMENT escribió:
>> On 07/02/2014 15:43, Ezequiel Garcia wrote:
>>> On Fri, Feb 07, 2014 at 09:24:30AM -0500, Jason Cooper wrote:
>>>> On Fri, Feb 07, 2014 at 10:06:08AM -0300, Emilio López wrote:
>>>>
>>>> [snip a great explanation]
>>>>
>>>> Guys, can I get some Tested-by's on this?
>>>>
>>>
>>> In case someone missed Emilio's comment about it, I gave his oneliner
>>> a test on A370 Reference Design. It worked just as well as Sebastian's.
>>
>> Well ok it's working but this patch is not better than Sebastian, it is
>> even worth. I don't think it is a good idea at all to totally ignore the
>> information given by the device tree.
> 
> With a bit more work, you can replace the clk_get magic with a call to 
> of_clk_get_parent_name() or similar to be able to keep overriding stuff 
> from DT. This way it would completely match the behaviour on 
> mvebu_coreclk_setup (default to "tclk", allow overriding with DT).
> 

I think you didn't have a look on our implementation: the name of the clock
are created by the driver during the initialization. That's why we need that
the parent clock are initialized before the gating clock. I know that for the
sunxi clock you choose to list all your clock name in the device tree, but we
didn't make this choice on purpose. It is not as trivial as you suggested.

I didn't have a look on the atmel clocks, and I don't know if they have this
kind of issue, as they also have to deal with multiple parents, they may
have different issues.

Gregory

> Emilio
> 


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2014-02-07 15:12 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-04 22:59 [PATCH] clk: respect the clock dependencies in of_clk_init Gregory CLEMENT
2014-02-04 22:59 ` Gregory CLEMENT
2014-02-05  5:09 ` Jason Cooper
2014-02-05  5:09   ` Jason Cooper
2014-02-05  8:45 ` Boris BREZILLON
2014-02-05  8:45   ` Boris BREZILLON
2014-02-05  9:48 ` [PATCH] clk: add strict of_clk_init dependency check Boris BREZILLON
2014-02-05  9:48   ` Boris BREZILLON
2014-02-05 14:48   ` Gregory CLEMENT
2014-02-05 14:48     ` Gregory CLEMENT
2014-02-05 15:05     ` Gregory CLEMENT
2014-02-05 15:05       ` Gregory CLEMENT
2014-02-05 15:07       ` Boris BREZILLON
2014-02-05 15:07         ` Boris BREZILLON
2014-02-05 23:11 ` [PATCH] clk: respect the clock dependencies in of_clk_init Sebastian Hesselbarth
2014-02-05 23:11   ` Sebastian Hesselbarth
2014-02-07 13:06 ` Emilio López
2014-02-07 13:06   ` Emilio López
2014-02-07 14:24   ` Jason Cooper
2014-02-07 14:24     ` Jason Cooper
2014-02-07 14:43     ` Ezequiel Garcia
2014-02-07 14:43       ` Ezequiel Garcia
2014-02-07 14:49       ` Gregory CLEMENT
2014-02-07 14:49         ` Gregory CLEMENT
2014-02-07 15:00         ` Emilio López
2014-02-07 15:00           ` Emilio López
2014-02-07 15:12           ` Gregory CLEMENT [this message]
2014-02-07 15:12             ` Gregory CLEMENT
2014-02-07 16:16             ` Emilio López
2014-02-07 16:16               ` Emilio López
2014-02-07 18:10               ` Gregory CLEMENT
2014-02-07 18:10                 ` Gregory CLEMENT
2014-02-07 18:17                 ` Emilio López
2014-02-07 18:17                   ` Emilio López
2014-02-07 23:15         ` Sebastian Hesselbarth
2014-02-07 23:15           ` Sebastian Hesselbarth

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=52F4F7EF.7090900@free-electrons.com \
    --to=gregory.clement@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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.