lkml.org 
[lkml]   [2023]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1] clk: Mark a fwnode as initialized when using CLK_OF_DECLARE* macros
On Wed, Mar 1, 2023 at 12:48 PM Stephen Boyd <sboyd@kernel.org> wrote:
>
> Quoting Stephen Boyd (2023-03-01 12:40:03)
> > Quoting Saravana Kannan (2023-02-28 17:25:06)
> > > 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.
> >
> > Why can't you use CLK_OF_DECLARE_DRIVER()?
>
> Ah I misunderstood. CLK_OF_DECLARE() _always_ prevents the creation of a
> struct device for the device node being handled. The 'sometimes' threw
> me off.

The "sometimes" is because dependending on the macro we go back and
clear the flag.

> >
> > >
> > > 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.
>
> How is this different from commit 3c9ea42802a1 ("clk: Mark fwnodes when
> their clock provider is added/removed")? Do you have some user of
> CLK_OF_DECLARE() that isn't registering an OF clk provider?

So it looks like drivers don't always register the same node used for
CLK_OF_DECLARE() as the clock provider. So, this is covering for the
case when that's not true.

-Saravana

\
 
 \ /
  Last update: 2023-03-27 00:41    [W:0.058 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site