RE: [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
-Original Message- From: Gopinath, Thara [mailto:th...@ti.com] Sent: Tuesday, October 20, 2009 11:37 PM To: Kevin Hilman; tero.kri...@nokia.com Cc: Ghongdemath, Girish; Woodruff, Richard; linux-omap@vger.kernel.org; jouni.hogan...@nokia.com Subject: RE: [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller OMAP3_PRM_VOLTCTRL_OFFSET); } + /* Re-enable interrupt controller autoidle */ + omap_writel(OMAP3430_AUTOIDLE, OMAP34XX_IC_BASE + INTC_SYSCONFIG); Autoidle is being enabled inside the if (core_next_state PWRDM_POWER_ON). This is a bug because it is disabled irrespective of core pwr domain state. So if Core domain is on , this code will end up not enabling INTC autoidle during resume. It's outside if (core_next_state *) check in restore path. I see this patch is dependent on some previous set of patches. -Girish -Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Kevin Hilman Sent: Tuesday, October 20, 2009 10:02 PM To: tero.kri...@nokia.com Cc: Ghongdemath, Girish; Woodruff, Richard; linux-omap@vger.kernel.org; jouni.hogan...@nokia.com Subject: Re: [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller tero.kri...@nokia.com writes: [...] Anyway, I guess the optimization would look something like this: diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 210a806..7a98321 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -93,6 +93,8 @@ u32 voltage_off_while_idle; OMAP3430_ST_GPT5_MASK|OMAP3430_ST_GPT4_MASK|\ OMAP3430_ST_GPT3_MASK|OMAP3430_ST_GPT2_MASK) +#define INTC_SYSCONFIG 0x10 + struct power_state { struct powerdomain *pwrdm; u32 next_state; @@ -505,6 +507,12 @@ void omap_sram_idle(void) prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); omap3_enable_io_chain(); } + /* +* Disable INTC autoidle as it can cause interrupt controller +* to enter unknown state with right combination of sleep / wakeup +* transitions +*/ + omap_writel(0x0, OMAP34XX_IC_BASE + INTC_SYSCONFIG); Except omap_write* functions are deprecated. I see, will use __raw_writel here then. I'd rather see a call into the interrupt code. Something like omap_intc_prepare_idle() Can do these changes to add the interface yes. Though name would be omap3_intc_prepare_idle() / ...resume_idle() as this is only needed for OMAP3. OK. Also, isn't this only needed if CORE != ON? I understood from the problem description that this is needed always when we are entering WFI, because we might have L3/L4 sleep/run transitions there even if CORE is on. OK. Kevin -- 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 -- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
tero.kri...@nokia.com writes: There was one report from a custom board when it made a difference. I've not tried to double check this data. I don't have the reporters setup so there is no guarantee I could reproduce anyway. In general optimization seemed to make sense. I second it. Regards, Girish Is there errata number available for this issue by the way? I could attach this to the patch. Anyway, I guess the optimization would look something like this: diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 210a806..7a98321 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -93,6 +93,8 @@ u32 voltage_off_while_idle; OMAP3430_ST_GPT5_MASK|OMAP3430_ST_GPT4_MASK|\ OMAP3430_ST_GPT3_MASK|OMAP3430_ST_GPT2_MASK) +#define INTC_SYSCONFIG 0x10 + struct power_state { struct powerdomain *pwrdm; u32 next_state; @@ -505,6 +507,12 @@ void omap_sram_idle(void) prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); omap3_enable_io_chain(); } + /* +* Disable INTC autoidle as it can cause interrupt controller +* to enter unknown state with right combination of sleep / wakeup +* transitions +*/ + omap_writel(0x0, OMAP34XX_IC_BASE + INTC_SYSCONFIG); Except omap_write* functions are deprecated. I'd rather see a call into the interrupt code. Something like omap_intc_prepare_idle() Also, isn't this only needed if CORE != ON? /* * On EMU/HS devices ROM code restores a SRDC value @@ -561,6 +569,8 @@ void omap_sram_idle(void) OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); } + /* Re-enable interrupt controller autoidle */ + omap_writel(OMAP3430_AUTOIDLE, OMAP34XX_IC_BASE + INTC_SYSCONFIG); and omap_intc_resume_idle() Kevin -- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
-Original Message- From: ext Kevin Hilman [mailto:khil...@deeprootsystems.com] Sent: 20 October, 2009 19:02 To: Kristo Tero (Nokia-D/Tampere) Cc: giris...@ti.com; r-woodru...@ti.com; linux-omap@vger.kernel.org; Hogander Jouni (Nokia-D/Tampere) Subject: Re: [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller tero.kri...@nokia.com writes: There was one report from a custom board when it made a difference. I've not tried to double check this data. I don't have the reporters setup so there is no guarantee I could reproduce anyway. In general optimization seemed to make sense. I second it. Regards, Girish Is there errata number available for this issue by the way? I could attach this to the patch. Anyway, I guess the optimization would look something like this: diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 210a806..7a98321 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -93,6 +93,8 @@ u32 voltage_off_while_idle; OMAP3430_ST_GPT5_MASK|OMAP3430_ST_GPT4_MASK|\ OMAP3430_ST_GPT3_MASK|OMAP3430_ST_GPT2_MASK) +#define INTC_SYSCONFIG 0x10 + struct power_state { struct powerdomain *pwrdm; u32 next_state; @@ -505,6 +507,12 @@ void omap_sram_idle(void) prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); omap3_enable_io_chain(); } + /* +* Disable INTC autoidle as it can cause interrupt controller +* to enter unknown state with right combination of sleep / wakeup +* transitions +*/ + omap_writel(0x0, OMAP34XX_IC_BASE + INTC_SYSCONFIG); Except omap_write* functions are deprecated. I see, will use __raw_writel here then. I'd rather see a call into the interrupt code. Something like omap_intc_prepare_idle() Can do these changes to add the interface yes. Though name would be omap3_intc_prepare_idle() / ...resume_idle() as this is only needed for OMAP3. Also, isn't this only needed if CORE != ON? I understood from the problem description that this is needed always when we are entering WFI, because we might have L3/L4 sleep/run transitions there even if CORE is on. /* * On EMU/HS devices ROM code restores a SRDC value @@ -561,6 +569,8 @@ void omap_sram_idle(void) OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); } + /* Re-enable interrupt controller autoidle */ + omap_writel(OMAP3430_AUTOIDLE, OMAP34XX_IC_BASE + INTC_SYSCONFIG); and omap_intc_resume_idle() -Tero-- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
tero.kri...@nokia.com writes: [...] Anyway, I guess the optimization would look something like this: diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 210a806..7a98321 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -93,6 +93,8 @@ u32 voltage_off_while_idle; OMAP3430_ST_GPT5_MASK|OMAP3430_ST_GPT4_MASK|\ OMAP3430_ST_GPT3_MASK|OMAP3430_ST_GPT2_MASK) +#define INTC_SYSCONFIG 0x10 + struct power_state { struct powerdomain *pwrdm; u32 next_state; @@ -505,6 +507,12 @@ void omap_sram_idle(void) prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); omap3_enable_io_chain(); } + /* +* Disable INTC autoidle as it can cause interrupt controller +* to enter unknown state with right combination of sleep / wakeup +* transitions +*/ + omap_writel(0x0, OMAP34XX_IC_BASE + INTC_SYSCONFIG); Except omap_write* functions are deprecated. I see, will use __raw_writel here then. I'd rather see a call into the interrupt code. Something like omap_intc_prepare_idle() Can do these changes to add the interface yes. Though name would be omap3_intc_prepare_idle() / ...resume_idle() as this is only needed for OMAP3. OK. Also, isn't this only needed if CORE != ON? I understood from the problem description that this is needed always when we are entering WFI, because we might have L3/L4 sleep/run transitions there even if CORE is on. OK. Kevin -- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
-Original Message- From: ext Girish S G [mailto:giris...@ti.com] Sent: 16 October, 2009 21:10 To: 'Woodruff, Richard'; Kristo Tero (Nokia-D/Tampere); linux-omap@vger.kernel.org Cc: Hogander Jouni (Nokia-D/Tampere) Subject: RE: [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller -Original Message- From: Woodruff, Richard [mailto:r-woodru...@ti.com] Sent: Friday, October 16, 2009 1:04 PM To: Ghongdemath, Girish; 'Tero Kristo'; linux-omap@vger.kernel.org Cc: 'Jouni Hogander' Subject: RE: [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller There was one report from a custom board when it made a difference. I've not tried to double check this data. I don't have the reporters setup so there is no guarantee I could reproduce anyway. In general optimization seemed to make sense. I second it. Regards, Girish Is there errata number available for this issue by the way? I could attach this to the patch. Anyway, I guess the optimization would look something like this: diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 210a806..7a98321 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -93,6 +93,8 @@ u32 voltage_off_while_idle; OMAP3430_ST_GPT5_MASK|OMAP3430_ST_GPT4_MASK|\ OMAP3430_ST_GPT3_MASK|OMAP3430_ST_GPT2_MASK) +#define INTC_SYSCONFIG 0x10 + struct power_state { struct powerdomain *pwrdm; u32 next_state; @@ -505,6 +507,12 @@ void omap_sram_idle(void) prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); omap3_enable_io_chain(); } + /* +* Disable INTC autoidle as it can cause interrupt controller +* to enter unknown state with right combination of sleep / wakeup +* transitions +*/ + omap_writel(0x0, OMAP34XX_IC_BASE + INTC_SYSCONFIG); /* * On EMU/HS devices ROM code restores a SRDC value @@ -561,6 +569,8 @@ void omap_sram_idle(void) OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); } + /* Re-enable interrupt controller autoidle */ + omap_writel(OMAP3430_AUTOIDLE, OMAP34XX_IC_BASE + INTC_SYSCONFIG); /* * Enable smartreflex after WFI. Only needed if we -- 1.5.4.3-- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- ow...@vger.kernel.org] On Behalf Of tero.kri...@nokia.com Sent: Monday, October 19, 2009 5:19 AM Is there errata number available for this issue by the way? I could attach this to the patch. No. I expect in the next few weeks it will be published. The issue is pretty well understood now down to gate level so time to publish should be process. Anyway, I guess the optimization would look something like this: The below looks good. diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 210a806..7a98321 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -93,6 +93,8 @@ u32 voltage_off_while_idle; OMAP3430_ST_GPT5_MASK|OMAP3430_ST_GPT4_MASK|\ OMAP3430_ST_GPT3_MASK|OMAP3430_ST_GPT2_MASK) +#define INTC_SYSCONFIG 0x10 + struct power_state { struct powerdomain *pwrdm; u32 next_state; @@ -505,6 +507,12 @@ void omap_sram_idle(void) prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); omap3_enable_io_chain(); } + /* +* Disable INTC autoidle as it can cause interrupt controller +* to enter unknown state with right combination of sleep / wakeup +* transitions +*/ + omap_writel(0x0, OMAP34XX_IC_BASE + INTC_SYSCONFIG); /* * On EMU/HS devices ROM code restores a SRDC value @@ -561,6 +569,8 @@ void omap_sram_idle(void) OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); } + /* Re-enable interrupt controller autoidle */ + omap_writel(OMAP3430_AUTOIDLE, OMAP34XX_IC_BASE + INTC_SYSCONFIG); /* * Enable smartreflex after WFI. Only needed if we -- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
-Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of tero.kri...@nokia.com Sent: Monday, October 19, 2009 5:19 AM Anyway, I guess the optimization would look something like this: diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 210a806..7a98321 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -93,6 +93,8 @@ u32 voltage_off_while_idle; OMAP3430_ST_GPT5_MASK|OMAP3430_ST_GPT4_MASK|\ OMAP3430_ST_GPT3_MASK|OMAP3430_ST_GPT2_MASK) +#define INTC_SYSCONFIG 0x10 + struct power_state { struct powerdomain *pwrdm; u32 next_state; @@ -505,6 +507,12 @@ void omap_sram_idle(void) prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); omap3_enable_io_chain(); } + /* +* Disable INTC autoidle as it can cause interrupt controller +* to enter unknown state with right combination of sleep / wakeup +* transitions +*/ + omap_writel(0x0, OMAP34XX_IC_BASE + INTC_SYSCONFIG); /* * On EMU/HS devices ROM code restores a SRDC value @@ -561,6 +569,8 @@ void omap_sram_idle(void) OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); } + /* Re-enable interrupt controller autoidle */ + omap_writel(OMAP3430_AUTOIDLE, OMAP34XX_IC_BASE + INTC_SYSCONFIG); /* * Enable smartreflex after WFI. Only needed if we Ack from me. -Girish -- 1.5.4.3-- 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 -- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- ow...@vger.kernel.org] On Behalf Of Tero Kristo Sent: Friday, October 16, 2009 5:49 AM OMAP interrupt controller goes to unknown state when there is right combination of l3,l4 sleep/wake-up transitions, l4 autoidle in interrupt controller and some interrupt. When this happens, interrupts are not delivered to ARM anymore and ARM will remain in WFI (wait for interrupt) until interrupt controller is forced to wake-up (i.e. lauterbach). Disable AUTOIDLE in INTC for now. Optimal work around enables and disables this around WFI. Regards, Richard W. -- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
-Original Message- From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap-ow...@vger.kernel.org] On Behalf Of Woodruff, Richard Sent: Friday, October 16, 2009 9:40 AM To: Tero Kristo; linux-omap@vger.kernel.org Cc: Jouni Hogander Subject: RE: [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- ow...@vger.kernel.org] On Behalf Of Tero Kristo Sent: Friday, October 16, 2009 5:49 AM OMAP interrupt controller goes to unknown state when there is right combination of l3,l4 sleep/wake-up transitions, l4 autoidle in interrupt controller and some interrupt. When this happens, interrupts are not delivered to ARM anymore and ARM will remain in WFI (wait for interrupt) until interrupt controller is forced to wake-up (i.e. lauterbach). Disable AUTOIDLE in INTC for now. Optimal work around enables and disables this around WFI. On one of the custom board the power measured didn't show any major impact, with just one time disabling of INTC-AUTOIDL. However, optimizing this WA looks good though. I did give it a try, Disabling/enabling INTC autoidle around WFI on custom board, works well but didn't get chance to measure the numbers. Regards, -Girish -- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
From: Ghongdemath, Girish Sent: Friday, October 16, 2009 12:48 PM On one of the custom board the power measured didn't show any major impact, with just one time disabling of INTC-AUTOIDL. However, optimizing this WA looks good though. I did give it a try, Disabling/enabling INTC autoidle around WFI on custom board, works well but didn't get chance to measure the numbers. There was one report from a custom board when it made a difference. I've not tried to double check this data. I don't have the reporters setup so there is no guarantee I could reproduce anyway. In general optimization seemed to make sense. Regards, Richard W. -- 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 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller
-Original Message- From: Woodruff, Richard [mailto:r-woodru...@ti.com] Sent: Friday, October 16, 2009 1:04 PM To: Ghongdemath, Girish; 'Tero Kristo'; linux-omap@vger.kernel.org Cc: 'Jouni Hogander' Subject: RE: [PATCH 12/17] OMAP2/3: Do not enable AUTOIDLE in interrupt controller There was one report from a custom board when it made a difference. I've not tried to double check this data. I don't have the reporters setup so there is no guarantee I could reproduce anyway. In general optimization seemed to make sense. I second it. Regards, Girish -- 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