On 7/30/2012 11:28 PM, Sekhar Nori wrote: > Hi Murali, > > On 7/28/2012 3:34 AM, Karicheri, Muralidharan wrote: >>>> >>>> On 7/25/2012 9:16 PM, Karicheri, Muralidharan wrote: >>>>> All, >>>>> >>>>> >>>>> >>>>> I am working to migrate DaVinci platforms to common clock framework. >>>>> While doing so I would need your support in terms of answering any >>>>> questions that I have, reviewing patches and testing. I have started >>>>> with DM6446 and I got the following questions to you. Could someone >>>>> clarify this for me? >>>>> >>>>> >>>>> >>>>> 1. davinci_clk_disable_unused(). From the description of the function >>>>> header, I understand this was added to disable lpsc modules that are >>>>> left enabled by the bootloader. So it appears that this is a hack. >>>> >>>> I wouldn't call it a hack. Reducing dependency on bootloader is a >>>> desirable feature. >>>> >>>>> Ideally bootloader needs to disable all of the modules before it enters >>>>> the kernel and this function shouldn’t have been there. Can someone >>>>> clarify if this is still needed? >>>> >>>> As you said that's in ideal world. Even if the latest bootloader had the >>>> code in place to do this, I suspect many would be stuck with old >>>> bootloaders on their boards so this is still required. >>>> >> >> Agreed. But to support this, I think I need to enhance the clk API interface. >> There is a function is_enabled() that can be implemented by the driver ( >> clk-psc in our case), but how do we know if a clock is in use or not. So >> a new API needs to be added is_inuse() or such which returns the enabled >> count. Once we have this, we should be able to implement >> davinci_clk_disable_unused() >> with common clock framework. I will send an RFC for this enhancement if >> this is not available already. > > I have not looked into the common clock framework so far, so cant > comment on the details. OMAP has a function that does similar > functionality (see omap2_clk_disable_unused() in > arch/arm/mach-omap2/clock.c). Rajendra Nayak has posted some patches[1]
Meant to give this link here. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-June/102490.html Thanks, Sekhar _______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
