Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1658434
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
| Newsgroups | linux.kernel |
| Subject | Re: CLK_OF_DECLARE advice required |
| Date | Tue, 06 Jun 2017 09:30:02 +0200 |
| Message-ID | <tPh6a-5ES-9@gated-at.bofh.it> (permalink) |
| References | <tMOrE-7i1-9@gated-at.bofh.it> <tNdJo-6BP-19@gated-at.bofh.it> <tNecq-6Ly-29@gated-at.bofh.it> <tNeFr-7az-9@gated-at.bofh.it> <tNrW2-7pv-5@gated-at.bofh.it> <tNtEu-9b-23@gated-at.bofh.it> <tO3oC-78v-13@gated-at.bofh.it> <tP3FV-5Hz-51@gated-at.bofh.it> <tP6DL-7wQ-1@gated-at.bofh.it> |
| X-Original-To | Stephen Boyd <sboyd@codeaurora.org> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4FKFkg5pVQ1JTIQ/1GbLwujuGKLU5jaJYexMJnt9l1c=; b=brSc54NSVz5spIagNmV1ug4dRuYQ1n8Jno2meYP1l6qcfIWn40tfJZTq6jyzcoVdoQ 4MMfPQo5jwSo3AclOqaHcfDZ0bxjCzEusXqEodTZuRi0LqC8h631EalnjqnwEJTZajYU POoqqE81iss4l4IsBwrSE9p6jyE5maxiOAboAbqZ1KvCLJwdiousOT1telqBVP6IyZwm aYRCmuXHmtsBo6hY3EcfXg4J8Zzd3UZgNhwEBgsPNGzdNYTIurrwbuggmEZD80vt25HS CNirHaV/lrxEIJwADNdmVxT7/xXv1ysJ7Q6plIlpQ32TV+dRDinMgDaJitUREFt0mruB wbPA== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=4FKFkg5pVQ1JTIQ/1GbLwujuGKLU5jaJYexMJnt9l1c=; b=nExU056hAbXqzcjnxZ1q2B2+EDWmBBf2PkOp6g8QWnxI3nCn3R2DiYxU17LHQDaRsG c1SNaWPZeNGIQdvsWfkPaDD9FtCWbDDYMrs5jtcpFcDFFeBRDWk6FKRX7fqXqxE4ijS3 evQRf5rx6UiQXFGk1TwgUIRuBE8+5zVclnaYFgAy6fHh8Rs+9tNt6cdXimeX6QAxQ3bf TLrJfMRoc7LW6LVGb+Kuke7Bl14xVZEdpszAWCZJvWzhcyOpp1txwjnwgnddD0b6wrEE x0Vl/FA12NW6E7EcoTW+NYOFyzv4GOnTDQlqCVYCPOfU3Zv4yPE9q53HgXkJZtqjGQ/f 93gA== |
| X-Gm-Message-State | AODbwcBZLK6p3juB0kc2oOauFgp36+aBQQ01lGNIrHdR3dvMvzyV/XHy TQQ8dhaiOROh57o4dtFfGwpGtnYO8Jah |
| X-Received | by 10.36.69.218 with SMTP id c87mr15300648itd.48.1496733732208; Tue, 06 Jun 2017 00:22:12 -0700 (PDT) |
| MIME-Version | 1.0 |
| X-Google-Sender-Auth | sWrSdZyFvpywbzu1jse7tpNp1SY |
| Content-Type | text/plain; charset="UTF-8" |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 60 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Phil Elwell <phil@raspberrypi.org>, Stefan Wahren <stefan.wahren@i2se.com>, Stephen Warren <swarren@wwwdotorg.org>, Michael Turquette <mturquette@baylibre.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, linux-rpi-kernel <linux-rpi-kernel@lists.infradead.org>, linux-clk <linux-clk@vger.kernel.org> |
| X-Original-Date | Tue, 6 Jun 2017 09:22:11 +0200 |
| X-Original-Message-ID | <CAMuHMdUEkHmpadT40=ZxNzQE+A_r97KA8p45f=fA8z7Bt_8xig@mail.gmail.com> |
| X-Original-References | <ae427c15-330f-6f8d-e2ac-62a8deacbdc5@raspberrypi.org> <8b65e551-e6dd-cf5c-1b22-e1f1a5996d73@wwwdotorg.org> <0794f430-9761-c855-9a89-13d9871c5831@i2se.com> <6765be64-9cf6-4663-4182-5b63f27bfb93@raspberrypi.org> <20170601063937.GN20170@codeaurora.org> <215eea3c-febe-5aa4-9dbb-e1f170bc0b0d@raspberrypi.org> <20170602223432.GU20170@codeaurora.org> <35742698-9f04-fa57-60b0-eecb3d790e03@raspberrypi.org> <20170605201314.GI20170@codeaurora.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1658434 |
Show key headers only | View raw
Hi Stephen,
On Mon, Jun 5, 2017 at 10:13 PM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 06/05, Phil Elwell wrote:
>> That sounds great, but it doesn't match my experience. Let me restate my
>> observations with a bit more detail.
>>
>> In this scenario there three devices in a dependency chain:
>>
>> clock -> fixed-factor->clock -> uart.
>>
>> The Fixed Factor Clock is declared with OF_CLK_DECLARE, while the two platform
>> drivers use normal probe functions.
>>
>> 1) of_clk_init() calls encounter FFC in the list of clocks to initialise and
>> calls parent_ready on the device node.
>>
>> 2) The parent clock has not been initialised, so of_clk_get returns
>> -EPROBE_DEFER.
>>
>> 3) Steps 1 and 2 repeat until no progress is made, at which point the force
>> flag is set for one last iteration. This time the parent_ready check is skipped
>> and the code calls indirectly into _of_fixed_factor_clk_setup().
>>
>> 4) The FFC setup calls of_clk_get_parent_name, which returns a NULL that ends
>> up referred to by the parent_names field of clk_init_data structure indirectly
>> passed to clk_hw_register and clk_register.
>
> That's bad. Does "clock" in this scenario have a
> clock-output-names property so we can find the name of the parent
> of the fixed factor clock? That way we can describe the fixed
> factor to "clock" linkage. Without that, things won't ever work.
>> Is this behaviour as intended? I can see that the NULL parent name in steps 4
>> and 5 could be handled more gracefully, but the end result would be the same.
>>
>> Where and how is the "orphan" clock concept supposed to help, and what needs to
>> be fixed in this case?
>>
>
> The orphan concept helps here because of_clk_init() eventually
> forces the registration of the fixed factor clock even though the
> fixed factor's parent has not been registered yet. As you've
> determined though, that isn't working properly because the fixed
> factor code is failing to get a name for the parent. Using the
> clock-output-names property would fix that though.
Isn't clock-output-names deprecated for clocks with a single clock
output?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
CLK_OF_DECLARE advice required Phil Elwell <phil@raspberrypi.org> - 2017-05-30 14:30 +0200
Re: CLK_OF_DECLARE advice required Stephen Warren <swarren@wwwdotorg.org> - 2017-05-31 17:30 +0200
Re: CLK_OF_DECLARE advice required Stefan Wahren <stefan.wahren@i2se.com> - 2017-05-31 18:00 +0200
Re: CLK_OF_DECLARE advice required Phil Elwell <phil@raspberrypi.org> - 2017-05-31 18:30 +0200
Re: CLK_OF_DECLARE advice required Stephen Warren <swarren@wwwdotorg.org> - 2017-05-31 18:50 +0200
Re: CLK_OF_DECLARE advice required Stephen Boyd <sboyd@codeaurora.org> - 2017-06-01 08:40 +0200
Re: CLK_OF_DECLARE advice required Phil Elwell <phil@raspberrypi.org> - 2017-06-01 10:30 +0200
Re: CLK_OF_DECLARE advice required Stephen Boyd <sboyd@codeaurora.org> - 2017-06-03 00:40 +0200
Re: CLK_OF_DECLARE advice required Phil Elwell <phil@raspberrypi.org> - 2017-06-05 19:10 +0200
Re: CLK_OF_DECLARE advice required Stephen Boyd <sboyd@codeaurora.org> - 2017-06-05 22:20 +0200
Re: CLK_OF_DECLARE advice required Geert Uytterhoeven <geert@linux-m68k.org> - 2017-06-06 09:30 +0200
Re: CLK_OF_DECLARE advice required Stephen Boyd <sboyd@codeaurora.org> - 2017-06-06 22:50 +0200
Re: CLK_OF_DECLARE advice required Phil Elwell <phil@raspberrypi.org> - 2017-06-06 11:00 +0200
csiph-web