RE: [PATCH 28/28] omap2 clock: handle (almost) all clock autoidlingviathe clock framework

Tuukka.Tikkanen
2007-08-23T09:21:17Z

[-- Attachment #1: Type: text/plain, Size: 2115 bytes --]

-----Original Message-----
> Subject: RE: [PATCH 28/28] omap2 clock: handle (almost) all clock
autoidlingviathe clock framework
>
> Hi Paul,
>
> > Existing OMAP2 code autoidles clocks via pm.c. OMAP clock framework
> > already has some support for enabling autoidle mode via the
allow_idle
> > function; however, this is currently unused. Take advantage of this
> > support by adding autoidle register and bit information for each
> > clock, defining an omap2_clk_allow_idle() function, and adding a
> > framework-wide function, clk_allow_idle_all(), to autoidle all
clocks,
> > intended to be called on init. Remove all but the APLL/DPLL
autoidle
> > bit twiddling from pm.c -- we don't yet have generalized support for
> APLL
> > autoidle. Handling autoidle via the clock framework ensures that we
> only
> > touch clocks that are currently configured.
>
> I thought about doing this back when OMAP1 added this when I was more
> active on OMAP2. However, I dropped it as it didn't have enough
'bang'
> in this form. I think these registers (even in OMAP1) are widely
> mis-understood. This is partially a TRM issue and one of complexity.

One minor detail to note is that on OMAP2 the sleep code sometimes has
to disable the autoidle feature on certain clocks. Not doing so would
prevent desired functionality. This - at least the action of setting the
autoidle state - of course could be handled via the clock framework.
However, it was deemed to be unnecessary extra layer, as the sleep code
already has to be very aware of the hardware its running on and any
abstraction is useless. I think at least timers and DMA have some
special restrictions in pm.c. Thus the original design of PM code
handling the autoidle bits.

Tuukka

----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]