Re: [RFC PATCH 0/2] Propose critical clocks
From: Marco Felsch
Date: Tue Jan 17 2023 - 13:21:40 EST
Hi Stephen,
sorry for the delay.
On 22-10-05, Stephen Boyd wrote:
> Quoting Marco Felsch (2022-10-05 01:23:48)
> > Hi Stephen, Michael,
> >
> > I know it is a busy time right now, but maybe you have a few minutes for
> > this RFC. I know it is incomplete, but the interessting part is there
> > and it would fix a real issue we encountered on the imx8mm-evk's.
> >
>
> There's another approach by Marek[1]. Can you work together on a
> solution? I think we should step away from trying to make the critical
> flag work during clk registration, and turn on the clk during provider
> registration instead. That hopefully makes it simpler. We can keep the
> clk flag of course, so that the clk can't be turned off, but otherwise
> we shouldn't need to make registration path check for the property.
Can you please explain your idea a bit more in detail so I can follow
you. The whole idea of this patchset is to enable a clock and never turn
it off. According the clk-provider.h comment this is the exact use-case
for the CLK_IS_CRITICAL flag. For static clock provider tree's like
soc-clock tree's this can be done by the driver by setting the
CLK_IS_CRITICAL flag within the struct clk_init_data. Now the question
is how I can add such a handling to "dynamic" clock providers which are
added by system-designs e.g. an i2c-clock provider. Of course each I2C
clock provider driver can check the flag but I wanted to make it common
to all.
Regards,
Marco
>
> [1] https://lore.kernel.org/all/20220924174517.458657-1-marex@xxxxxxx/
>