RE: [PATCH 0/8] OMAP3: PM: Open Switch Retention support in the cpuidle thread.
On Thu, 21 Jan 2010, Gopinath, Thara wrote: > >>-Original Message- > >>From: Paul Walmsley [mailto:p...@pwsan.com] > >>Sent: Thursday, January 21, 2010 11:54 AM > >>To: Gopinath, Thara > >>Cc: linux-omap@vger.kernel.org; khil...@deeprootsystems.com > >>Subject: Re: [PATCH 0/8] OMAP3: PM: Open Switch Retention support in the > >>cpuidle thread. > >> > >>I'd like to merge the powerdomain changes separately from the other > >>changes, most of which should probably go through Kevin's PM branch. > >> > >>After you revise your patches based on the comments, can you take your > >>patches 3, 4, and the powerdomain portions of patch 7 and post those in a > >>separate series as an OSWR preparatory powerdomain patch set? That will > >>make it easier for both Kevin and I to handle. > > When you say patch 7, I believe you are mentioning the book keeping part > for OSWR where logic_ret_off and mem_ret_off counters are added. Yes, to be specific, I'm talking about: diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 06bf290..ef9f1bb 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -126,6 +126,16 @@ static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag) prev = pwrdm_read_prev_pwrst(pwrdm); if (pwrdm->state != prev) pwrdm->state_counter[prev]++; + if (prev == PWRDM_POWER_RET) { + if ((pwrdm->pwrsts_logic_ret == PWRSTS_OFF_RET) && + (pwrdm_read_prev_logic_pwrst(pwrdm) == +PWRDM_POWER_OFF)) + pwrdm->ret_logic_off_counter++; + if ((pwrdm->pwrsts_mem_ret[0] == PWRSTS_OFF_RET) && + (pwrdm_read_prev_mem_pwrst(pwrdm, 0) == + PWRDM_POWER_OFF)) + pwrdm->ret_mem_off_counter++; + } break; default: return -EINVAL; @@ -161,6 +171,9 @@ static __init void _pwrdm_setup(struct powerdomain *pwrdm) for (i = 0; i < PWRDM_MAX_PWRSTS; i++) pwrdm->state_counter[i] = 0; + pwrdm->ret_logic_off_counter = 0; + pwrdm->ret_mem_off_counter = 0; + pwrdm_wait_transition(pwrdm); pwrdm->state = pwrdm_read_pwrst(pwrdm); pwrdm->state_counter[pwrdm->state] = 1; and diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h index 7576559..405ccd6 100644 --- a/arch/arm/plat-omap/include/plat/powerdomain.h +++ b/arch/arm/plat-omap/include/plat/powerdomain.h @@ -124,6 +124,8 @@ struct powerdomain { int state; unsigned state_counter[PWRDM_MAX_PWRSTS]; + unsigned ret_logic_off_counter; + unsigned ret_mem_off_counter; #ifdef CONFIG_PM_DEBUG s64 timer; > I can separate this out and post these three patches separately. Do let > me know should I base these on linux-omap master branch or Kevin's pm > tree. l-o master, please. > >>Note: the powerdomain code will need to be edited somewhat to bring it > >>up-to-date with the latest OMAP4 changes in the for_2.6.34 branch, which > >>is where your patches will go. I'm happy to do this, but after I do it, > >>will you be able to test the updated series to ensure that this process > >>didn't break anything? > > Thanks for this and sure I can test the updated series! Great. > But I do not understand what OMAP4 specific support has to be added for > these three patches. These three patches will be considerably free of > OMAP2/OMAP3/OMAP4 specific stuff. Or are you talking of rebasing on > 2.6.34 kernel? OMAP4 has an additional memory bank. Also the names of the bitfields have been abstracted out, e.g., OMAP_MEM0_RETSTATE_MASK instead of OMAP3430_SHAREDL1CACHEFLATRETSTATE. You can check 'for_2.6.34' branch at git://git.pwsan.com/linux-2.6 to see what it looks like. - Paul -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 0/8] OMAP3: PM: Open Switch Retention support in the cpuidle thread.
>>-Original Message- >>From: Paul Walmsley [mailto:p...@pwsan.com] >>Sent: Thursday, January 21, 2010 11:54 AM >>To: Gopinath, Thara >>Cc: linux-omap@vger.kernel.org; khil...@deeprootsystems.com >>Subject: Re: [PATCH 0/8] OMAP3: PM: Open Switch Retention support in the >>cpuidle thread. >> >> >>Hi Thara, >> >>I'd like to merge the powerdomain changes separately from the other >>changes, most of which should probably go through Kevin's PM branch. >> >>After you revise your patches based on the comments, can you take your >>patches 3, 4, and the powerdomain portions of patch 7 and post those in a >>separate series as an OSWR preparatory powerdomain patch set? That will >>make it easier for both Kevin and I to handle. When you say patch 7, I believe you are mentioning the book keeping part for OSWR where logic_ret_off and mem_ret_off counters are added. I can separate this out and post these three patches separately. Do let me know should I base these on linux-omap master branch or Kevin's pm tree. >> >>Note: the powerdomain code will need to be edited somewhat to bring it >>up-to-date with the latest OMAP4 changes in the for_2.6.34 branch, which >>is where your patches will go. I'm happy to do this, but after I do it, >>will you be able to test the updated series to ensure that this process >>didn't break anything? Thanks for this and sure I can test the updated series! But I do not understand what OMAP4 specific support has to be added for these three patches. These three patches will be considerably free of OMAP2/OMAP3/OMAP4 specific stuff. Or are you talking of rebasing on 2.6.34 kernel? Regards Thara -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/8] OMAP3: PM: Open Switch Retention support in the cpuidle thread.
Hi Thara, I'd like to merge the powerdomain changes separately from the other changes, most of which should probably go through Kevin's PM branch. After you revise your patches based on the comments, can you take your patches 3, 4, and the powerdomain portions of patch 7 and post those in a separate series as an OSWR preparatory powerdomain patch set? That will make it easier for both Kevin and I to handle. Note: the powerdomain code will need to be edited somewhat to bring it up-to-date with the latest OMAP4 changes in the for_2.6.34 branch, which is where your patches will go. I'm happy to do this, but after I do it, will you be able to test the updated series to ensure that this process didn't break anything? regards, - Paul -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/8] OMAP3: PM: Open Switch Retention support in the cpuidle thread.
In OMAP all power domains embed some logic and some memory. The power domain memory contains memory arrays: powered by a dedicated voltage rail memory logic : powered by the same voltage rail as the power domain logic but has a dedicated power switch(power on switch) The power domain logic for some power domains can be split between retention flip flops (RFF) or nonretention flip flops (DFF). When a power domain is in Open Switch Retention(OSWR) power on switch is set to 0, Vdd can be lowered to its retention value and is provided only to the RFF logic. Only the RFF logic is retained. The DFF logic is lost and reset on wakeup. The voltage to the memory arrays can be retained or cut which will in turn lead to memory arrays retaining or losing their contents This patch series introduces OSWR support for MPU and core domain in the cpuidle thread. The voltage to memory arrays in these power domains are also cut during OSWR. Thara Gopinath (8): PM: Increase the cpu idle max state. OMAP3 PM: Conditional UART context save restore. OMAP2/3 PM: Adding powerdomain APIs for reading the next logic and mem state OMAP3 PM: Defining .pwrsts_logic_ret field for core power domain structure OMAP3 PM: Adding conditional core powerdomain context save and restore OMAP3 PM: Enable DPLL4 autoidle after system off. OMAP3 PM: Support for Open SWitch Retention for Core and MPU power domains in cpuidle path OMAP3 PM: Support to enable disable OSWR feature from pm debug fs arch/arm/mach-omap2/board-3430sdp.c |4 + arch/arm/mach-omap2/cpuidle34xx.c | 138 +++-- arch/arm/mach-omap2/pm-debug.c|5 + arch/arm/mach-omap2/pm.h |1 + arch/arm/mach-omap2/pm34xx.c | 137 ++--- arch/arm/mach-omap2/powerdomain.c | 84 +++ arch/arm/mach-omap2/powerdomains34xx.h|2 + arch/arm/mach-omap2/serial.c | 17 ++-- arch/arm/mach-omap2/sleep34xx.S |4 + arch/arm/plat-omap/include/plat/powerdomain.h |4 + arch/arm/plat-omap/include/plat/serial.h |2 +- include/linux/cpuidle.h |2 +- 12 files changed, 342 insertions(+), 58 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html