Re: [PATCH v1] clk: Mark a fwnode as initialized when using CLK_OF_DECLARE* macros

From: Linus Walleij
Date: Wed Mar 01 2023 - 07:11:16 EST


On Wed, Mar 1, 2023 at 2:25 AM Saravana Kannan <saravanak@xxxxxxxxxx> wrote:

> The CLK_OF_DECLARE macros sometimes prevent the creation of struct
> devices for the device node being handled. It does this by
> setting/clearing OF_POPULATED flag. This can block the probing of some
> devices because fw_devlink will block the consumers of this node till a
> struct device is created and probed.
>
> Set the appropriate fwnode flags when these device nodes are initialized
> by the clock framework and when OF_POPULATED flag is set/cleared. This
> will allow fw_devlink to handle the dependencies correctly.
>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Reported-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> Link: https://lore.kernel.org/lkml/CACRpkdamxDX6EBVjKX5=D3rkHp17f5pwGdBVhzFU90-0MHY6dQ@xxxxxxxxxxxxxx/
> Fixes: 4a032827daa8 ("of: property: Simplify of_link_to_phandle()")
> Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>

Excellent Saravana, this fixes my issue!
Tested-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij