All of lore.kernel.org
 help / color / mirror / Atom feed
* Question on pre running clocks
@ 2023-10-20  7:07 Arun KS
  2023-10-20  7:09 ` Arun KS
  0 siblings, 1 reply; 3+ messages in thread
From: Arun KS @ 2023-10-20  7:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: sboyd, mturquette, Arun KS

Hello,

Lets say there is a clock which is enabled by bootloaders and is pre
running as linux boots.
Is it mandatory for the client drivers to call clk_prepare_enable() on
them to initialise the enable_count to 1?

Or is there a way we can specify to the kernel that this clock is
already enabled by bootloader and initialise the enable_count for this
clock to 1.

Because otherwise, clk_disable() prints a WARN() if a client driver
uses clock handle where clk_prepare_enable() is not called.

I grep through the code, but could find any details. Appreciate any pointers.

Regards,
Arun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question on pre running clocks
  2023-10-20  7:07 Question on pre running clocks Arun KS
@ 2023-10-20  7:09 ` Arun KS
  2023-10-24  2:42   ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Arun KS @ 2023-10-20  7:09 UTC (permalink / raw)
  To: linux-kernel, linux-clk; +Cc: sboyd, mturquette, Arun KS

+ linux-clk

On Fri, Oct 20, 2023 at 12:37 PM Arun KS <arunks.linux@gmail.com> wrote:
>
> Hello,
>
> Lets say there is a clock which is enabled by bootloaders and is pre
> running as linux boots.
> Is it mandatory for the client drivers to call clk_prepare_enable() on
> them to initialise the enable_count to 1?
>
> Or is there a way we can specify to the kernel that this clock is
> already enabled by bootloader and initialise the enable_count for this
> clock to 1.
>
> Because otherwise, clk_disable() prints a WARN() if a client driver
> uses clock handle where clk_prepare_enable() is not called.
>
> I grep through the code, but could find any details. Appreciate any pointers.
>
> Regards,
> Arun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Question on pre running clocks
  2023-10-20  7:09 ` Arun KS
@ 2023-10-24  2:42   ` Stephen Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2023-10-24  2:42 UTC (permalink / raw)
  To: Arun KS, linux-clk, linux-kernel; +Cc: mturquette, Arun KS

Quoting Arun KS (2023-10-20 00:09:05)
> + linux-clk
> 
> On Fri, Oct 20, 2023 at 12:37 PM Arun KS <arunks.linux@gmail.com> wrote:
> >
> > Hello,
> >
> > Lets say there is a clock which is enabled by bootloaders and is pre
> > running as linux boots.
> > Is it mandatory for the client drivers to call clk_prepare_enable() on
> > them to initialise the enable_count to 1?

Yes.

> >
> > Or is there a way we can specify to the kernel that this clock is
> > already enabled by bootloader and initialise the enable_count for this
> > clock to 1.

No there isn't.

> >
> > Because otherwise, clk_disable() prints a WARN() if a client driver
> > uses clock handle where clk_prepare_enable() is not called.
> >
> > I grep through the code, but could find any details. Appreciate any pointers.
> >
> > Regards,
> > Arun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-24  2:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20  7:07 Question on pre running clocks Arun KS
2023-10-20  7:09 ` Arun KS
2023-10-24  2:42   ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.