Re: [PATCH 1/3] ARM: OMAP2+: clockdomain: Add mechanism for disabling HW_AUTO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Roger Quadros <rogerq@xxxxxx> [151125 02:52]:
> 
> On 03/09/15 10:39, Roger Quadros wrote:
> > On 28/07/15 14:34, Roger Quadros wrote:
> >> Paul,
> >>
> >> On 16/07/15 16:56, Roger Quadros wrote:
> >>> On 16/07/15 04:25, Paul Walmsley wrote:
> >>>> Hi
> >>>>
> >>>> On Tue, 23 Jun 2015, Roger Quadros wrote:
> >>>>
> >>>>> For some hwmods (e.g. DCAN on DRA7) we need the possibility to
> >>>>> disable HW_AUTO for the clockdomain while the module is active.
> >>>>>
> >>>>> To achieve this there needs to be a refcounting mechanism to
> >>>>> indicate whether any module in the clockdomain has requested
> >>>>> to disable HW_AUTO. We keep track of this in 'noidlecount'.
> >>>>>
> >>>>> Hwmod code must use clkdm_hwmod_prevent_hwauto() to prevent
> >>>>> HW_AUTO of the clockdomain in the future clkdm_hwmod_hwauto() calls.
> >>>>>
> >>>>> It must use clkdm_hwmod_allow_hwauto() to allow HW_AUTO in
> >>>>> the future clkdm_hwmod_hwauto() calls.
> >>>>>
> >>>>> Hwmod code must use clkdm_hwmod_allow_hwauto() whenever it needs
> >>>>> to request HW_AUTO of any clockdomain. (Typically after it has
> >>>>> enabled the module).
> >>>>
> >>>> How about just modifying clkdm_{allow,deny}_idle*() to do the 
> >>>> idle-block-counting?  The default state would be to allow idle, assuming 
> >>>> that the clockdomain flags support that state, and then clkdm_deny_idle*() 
> >>>> would increment the idle-blocking count, clkdm_allow_idle*() would 
> >>>> decrement it.  Then on the 0 -> 1 or 1 -> 0 transitions, the hardware 
> >>>> would be reprogrammed appropiately.
> >>>
> >>> That is not possible with current hwmod code as clkdm_allow_idle() and clkdm_deny_idle()
> >>> are not symmetrically placed.
> >>>
> >>> The usual flow is
> >>> 	clkdm_enable_hwmod();
> >>> 	if (hwsup)
> >>> 		clkdm_allow_idle();
> >>>
> >>> This is mainly because it is redundant to disable auto idle before enableing
> >>> (SW_WKUP) the clockdomain.
> >>>
> >>> If we take your proposal above then we have to modify all users like so.
> >>>
> >>> 	if (hwsup)
> >>> 		clkdm_deny_idle();
> >>> 	clkdm_enable_hwmod();
> >>> 	if (hwsup)
> >>> 		clkdm_allow_idle();
> >>>
> >>> Is this really what we want?
> >>
> >> Any comments on this?
> > 
> > Paul. I'm waiting on your input to rework this series if needed.
> > Early input would be much appreciated. Thanks.
> 
> Not sure if Paul is receiving my e-mails but I'd like
> others to give their opinion on how we can proceed with this. Thanks.

Well in the long run we want to have a proper bus driver for each interconnect
instance and use genpd. I'm afraid that solution is not going to help
immediately though.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux