From: Stephen Boyd <sboyd@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Turquette <mturquette@baylibre.com>,
Saravana Kannan <saravanak@google.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
kernel-team@android.com, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro
Date: Mon, 06 Mar 2023 11:14:41 -0800 [thread overview]
Message-ID: <7e28fb6ea6c1f646b02cd166c9782539.sboyd@kernel.org> (raw)
In-Reply-To: <20230302014639.297514-1-saravanak@google.com>
Quoting Saravana Kannan (2023-03-01 17:46:38)
> We already mark fwnodes as initialized when they are registered as clock
> providers. We do this so that fw_devlink can tell when a clock driver
> doesn't use the driver core framework to probe/initialize its device.
> This ensures fw_devlink doesn't block the consumers of such a clock
> provider indefinitely.
>
> However, some users of CLK_OF_DECLARE() macros don't use the same node
> that matches the macro as the node for the clock provider, but they
> initialize the entire node. To cover these cases, also mark the nodes
> that match the macros as initialized when the init callback function is
> called.
>
> An example of this is "stericsson,u8500-clks" that's handled using
> CLK_OF_DECLARE() and looks something like this:
>
> clocks {
> compatible = "stericsson,u8500-clks";
>
> prcmu_clk: prcmu-clock {
> #clock-cells = <1>;
> };
>
> prcc_pclk: prcc-periph-clock {
> #clock-cells = <2>;
> };
>
> prcc_kclk: prcc-kernel-clock {
> #clock-cells = <2>;
> };
>
> prcc_reset: prcc-reset-controller {
> #reset-cells = <2>;
> };
> ...
> ...
> };
>
> This patch makes sure that "clocks" is marked as initialized so that
> fw_devlink knows that all nodes under it have been initialized.
>
> If the driver creates struct devices for some of the subnodes,
> fw_devlink is smart enough to know to wait for those devices to probe.
> So, no special handling is required for those cases.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Reported-by: Linus Walleij <linus.walleij@linaro.org>
> Link: https://lore.kernel.org/lkml/CACRpkdamxDX6EBVjKX5=D3rkHp17f5pwGdBVhzFU90-0MHY6dQ@mail.gmail.com/
> Fixes: 4a032827daa8 ("of: property: Simplify of_link_to_phandle()")
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> ---
Applied to clk-fixes
next prev parent reply other threads:[~2023-03-06 19:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 1:46 Saravana Kannan
2023-03-02 1:53 ` Saravana Kannan
2023-03-02 13:14 ` Linus Walleij
2023-03-03 21:24 ` Saravana Kannan
2023-03-06 19:15 ` Stephen Boyd
2023-03-08 16:01 ` Nathan Chancellor
2023-03-08 20:35 ` Saravana Kannan
2023-03-06 19:14 ` Stephen Boyd [this message]
2023-03-06 19:15 ` Saravana Kannan
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=7e28fb6ea6c1f646b02cd166c9782539.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linus.walleij@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=saravanak@google.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
all inboxes | Powered by JetHome®