Re: [PATCH 2/8] PRCM: Workaround for pwrdn_x control

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

 



"ext Paul Walmsley" <paul@xxxxxxxxx> writes:

> Hello Jouni,
>
> On Tue, 17 Jun 2008, Jouni Hogander wrote:
>
>> Clock path should be powered down only after all it's clients are
>> properly disabled. Generally we don't have working implementation for
>> checking wether some clock is enabled or disabled.
>
> Just wanted to revisit this again briefly.  Is this patch intended to fix 
> DPLL output powerdown paths?  Or do all clocks need this for some
> reason?

Delay is needed only between client disable and output path power
down.

>
> If the former, what do you think instead about adding a custom disable 
> function for the DPLL outputs which would include the udelay()?
> That way we might be able to avoid adding the udelay() to all clock 
> disable calls.

Yes, this sounds more reasonable. I'm preparing one more version of
of workaround set. I can do this also. What do you think, is this
still workaround or are we planning to implement wait_rdy which checks
also wether clock is disabled?

>
> - Paul
>
>>  arch/arm/mach-omap2/clock.c |   11 ++++++++++-
>>  1 files changed, 10 insertions(+), 1 deletions(-)
>> 
>> diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
>> index ed15868..9099ba6 100644
>> --- a/arch/arm/mach-omap2/clock.c
>> +++ b/arch/arm/mach-omap2/clock.c
>> @@ -329,6 +329,9 @@ void omap2_clk_disable(struct clk *clk)
>>  {
>>  	if (clk->usecount > 0 && !(--clk->usecount)) {
>>  		_omap2_clk_disable(clk);
>> +		/* XXX Currently we don't have working code for
>> +		 * checking wether clock is really disabled */
>> +		udelay(10);
>>  		if (clk->parent)
>>  			omap2_clk_disable(clk->parent);
>>  		if (clk->clkdm)
>> @@ -974,6 +977,12 @@ void omap2_clk_disable_unused(struct clk *clk)
>>  		return;
>>  
>>  	printk(KERN_INFO "Disabling unused clock \"%s\"\n", clk->name);
>> -	_omap2_clk_disable(clk);
>> +	/* XXX In case of omap3 we need to make sure that sequence is
>> +	 * correct when disabling clocks */
>> +	if (cpu_is_omap34xx()) {
>> +		omap2_clk_enable(clk);
>> +		omap2_clk_disable(clk);
>> +	} else
>> +		_omap2_clk_disable(clk);
>>  }
>>  #endif
>> -- 
>> 1.5.5
>> 
>> --
>> 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
>> 
>
>
> - Paul
>
>

-- 
Jouni Högander

--
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