From: Stephen Boyd <sboyd@kernel.org>
To: alexandre.belloni@bootlin.com,
claudiu beznea <claudiu.beznea@tuxon.dev>,
mripard@kernel.org, mturquette@baylibre.com,
nicolas.ferre@microchip.com
Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, varshini.rajendran@microchip.com
Subject: Re: [PATCH 03/42] clk: at91: sam9x60: switch to parent_hw and parent_data
Date: Fri, 08 Sep 2023 17:06:18 -0700 [thread overview]
Message-ID: <de9c4d5ea85da5614563bee7d3368459.sboyd@kernel.org> (raw)
In-Reply-To: <79a79ec5-3691-43d2-ca3e-478a94f85e2d@tuxon.dev>
Sorry, I missed this series in my review queue.
Quoting claudiu beznea (2023-08-01 21:24:54)
> On 29.07.2023 06:28, Stephen Boyd wrote:
> > Quoting Claudiu Beznea (2023-07-26 22:31:17)
> >> @@ -177,31 +178,34 @@ static const struct {
> >> - td_slck_name = of_clk_get_parent_name(np, i);
> >> -
> >> - i = of_property_match_string(np, "clock-names", "md_slck");
> >> - if (i < 0)
> >> + td_slck_hw = __clk_get_hw(clk);
> >
> > Don't introduce more usage of __clk_get_hw(). The index for "td_slck"
> > should be known, and it can be used as the index member in struct
> > clk_parent_data. This allows the clk framework to lazily find the
> > parent, instead of requiring the parent to be registered before this
> > code runs. It also reduces the usage of __clk_get_hw().
>
> If I'll do this I will have to also change the approach that has been done
> for SAMA7G5 (already integrated in v6.5-rc1, maybe I had to let it more on
> the mailing list before taking into the tree) for all the clock drivers
> (basically instead of parent_hws I will have to provide parent_data to AT91
> clock registration APIs AFAICT). No issue with that... just telling...
Ok. Please do that.
>
> The reason I did it with parent_hws + __clk_get_hw() on PMC parents in
> SAMA7G5 is that SAMA7G5 PLL parent rate need to be known from the
> registration to setup properly the PLL. Otherwise PLL will not lock if not
> properly setup. For this I got the parent_hw for PLL parent to retrieve its
> rate and thus I chose at that time to also get the clk_hw for the other
> parents of PMC just to have the same approach on all parents (and it looked
> to me that code will be simpler).
You can use the regular clk_get() APIs for that if you're trying to
enforce a "this clk must be registered first" sort of thing. If the
clk_get() call fails, then the driver can probe defer, etc. But don't
turn around and take that clk and call __clk_get_hw() on it to express
the parent relationship. Instead, let the parent matching take place
through the normal means. The goal is to get rid of __clk_get_hw() at
some point.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-09-09 0:06 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 5:31 [PATCH 00/42] clk: at91: add support for parent_data and parent_hw (take #2) Claudiu Beznea
2023-07-27 5:31 ` [PATCH 01/42] clk: at91: sama7g5: check __clk_get_hw() argument for errors Claudiu Beznea
2023-07-27 5:31 ` [PATCH 02/42] clk: at91: clk-usb: add support for parent_hw Claudiu Beznea
2023-07-27 5:31 ` [PATCH 03/42] clk: at91: sam9x60: switch to parent_hw and parent_data Claudiu Beznea
2023-07-29 3:28 ` Stephen Boyd
2023-08-02 4:24 ` claudiu beznea
2023-09-09 0:06 ` Stephen Boyd [this message]
2023-07-27 5:31 ` [PATCH 04/42] clk: at91: sam9x60: make checkpatch.pl happy Claudiu Beznea
2023-07-27 5:31 ` [PATCH 05/42] clk: at91: clk-pll: add support for parent_hw Claudiu Beznea
2023-07-27 5:31 ` [PATCH 06/42] clk: at91: clk-audio-pll: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 07/42] clk: at91: clk-plldiv: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 08/42] clk: at91: clk-h32mx: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 09/42] clk: at91: clk-i2s-mux: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 10/42] clk: at91: sama5d2: switch to parent_hw and parent_data Claudiu Beznea
2023-07-27 5:31 ` [PATCH 11/42] clk: at91: clk-smd: add support for parent_hw Claudiu Beznea
2023-07-27 5:31 ` [PATCH 12/42] clk: at91: sama5d3: switch to parent_hw and parent_data Claudiu Beznea
2023-07-27 5:31 ` [PATCH 13/42] clk: at91: sama5d3: make checkpatch.pl happy Claudiu Beznea
2023-07-27 5:31 ` [PATCH 14/42] clk: at91: sama5d4: switch to parent_hw and parent_data Claudiu Beznea
2023-07-27 5:31 ` [PATCH 15/42] clk: at91: at91sam9x5: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 16/42] clk: at91: at91rm9200: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 17/42] clk: at91: at91rm9200: fix checkpatch.pl check Claudiu Beznea
2023-07-27 8:46 ` Krzysztof Kozlowski
2023-07-27 5:31 ` [PATCH 18/42] " Claudiu Beznea
2023-07-27 8:47 ` Krzysztof Kozlowski
2023-07-27 5:31 ` [PATCH 19/42] clk: at91: clk-slow: add support for parent_hw Claudiu Beznea
2023-07-27 5:31 ` [PATCH 20/42] clk: at91: at91sam9260: switch to parent_hw and parent_data Claudiu Beznea
2023-07-27 5:31 ` [PATCH 21/42] clk: at91: at91sam9g45: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 22/42] clk: at91: at91sam9g45: fix checkpatch.pl check Claudiu Beznea
2023-07-27 5:31 ` [PATCH 23/42] clk: at91: at91sam9n12: switch to parent_hw and parent_data Claudiu Beznea
2023-07-27 5:31 ` [PATCH 24/42] clk: at91: at91sam9n12: remove checkpatch.pl checks Claudiu Beznea
2023-07-27 5:31 ` [PATCH 25/42] clk: at91: at91sam9rl: switch to parent_hw Claudiu Beznea
2023-07-27 5:31 ` [PATCH 26/42] clk: at91: dt-compat: switch to parent_hw and parent_data Claudiu Beznea
2023-07-27 5:31 ` [PATCH 27/42] clk: at91: clk-audio-pll: remove parent_names support Claudiu Beznea
2023-07-27 5:31 ` [PATCH 28/42] clk: at91: clk-generated: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 29/42] clk: at91: clk-h32mx: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 30/42] clk: at91: clk-i2s-mux: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 31/42] clk: at91: clk-main: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 32/42] clk: at91: clk-master: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 33/42] clk: at91: clk-peripheral: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 34/42] clk: at91: clk-pll: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 35/42] clk: at91: clk-plldiv: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 36/42] clk: at91: clk-programmable: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 37/42] clk: at91: clk-sam9x60-pll: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 38/42] clk: at91: clk-slow: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 39/42] clk: at91: clk-smd: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 40/42] clk: at91: clk-system: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 41/42] clk: at91: clk-usb: " Claudiu Beznea
2023-07-27 5:31 ` [PATCH 42/42] clk: at91: clk-utmi: " Claudiu Beznea
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=de9c4d5ea85da5614563bee7d3368459.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=nicolas.ferre@microchip.com \
--cc=varshini.rajendran@microchip.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).