From: Nishanth Menon <nm@xxxxxx> With the current interrupt disable sequence, we disable IRQENABLE followed by clearing of IRQSTATUS. With this sequence, we see, at times CORE domain does not hit OFF mode during cold boot because SR modules(Core/IVA/MPU domains) are stuck 'in transition'. This is due to IP Generic behavior around how swakeup is controlled towards PRCM. The right sequence we have is write to IRQSTATUS register to clear the interrupt, then write to IRQENABLE_CLR register to disable the interrupt to ensure that no pending interrupts exist in the system on disable of SmartReflex AVS block. Reported-by: Honda Kenji <x0092217@xxxxxx> Reported-by: Maki Tanaka <m-tanaka1@xxxxxx> Signed-off-by: Nishanth Menon <nm@xxxxxx> Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@xxxxxx> --- drivers/power/avs/smartreflex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c index 6b2238b..5b2b703 100644 --- a/drivers/power/avs/smartreflex.c +++ b/drivers/power/avs/smartreflex.c @@ -295,12 +295,12 @@ static void sr_v2_disable(struct omap_sr *sr) else sr_modify_reg(sr, ERRCONFIG_V2, ERRCONFIG_VPBOUNDINTEN_V2, 0x0); - sr_write_reg(sr, IRQENABLE_CLR, (IRQENABLE_MCUACCUMINT | - IRQENABLE_MCUVALIDINT | - IRQENABLE_MCUBOUNDSINT)); sr_write_reg(sr, IRQSTATUS, (IRQSTATUS_MCUACCUMINT | IRQSTATUS_MCVALIDINT | IRQSTATUS_MCBOUNDSINT)); + sr_write_reg(sr, IRQENABLE_CLR, (IRQENABLE_MCUACCUMINT | + IRQENABLE_MCUVALIDINT | + IRQENABLE_MCUBOUNDSINT)); /* * Wait for SR to be disabled. @@ -315,8 +315,8 @@ static void sr_v2_disable(struct omap_sr *sr) __func__); /* Disable MCUDisableAcknowledge interrupt & clear pending interrupt */ - sr_write_reg(sr, IRQENABLE_CLR, IRQENABLE_MCUDISABLEACKINT); sr_write_reg(sr, IRQSTATUS, IRQSTATUS_MCUDISABLEACKINT); + sr_write_reg(sr, IRQENABLE_CLR, IRQENABLE_MCUDISABLEACKINT); } static struct omap_sr_nvalue_table *sr_retrieve_nvalue_row( -- 1.7.9.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