[PATCH V5 07/20] ARM: exynos: cpuidle: Fix S5P_WAKEUP_STAT call

Daniel Lezcano daniel.lezcano at linaro.org
Fri Apr 11 03:40:02 PDT 2014


This function should be called only when the powerdown sequence fails.

Even if the current code does not hurt, by moving this line, we have the same
code than the one in pm.c.

Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar at linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie at samsung.com>
Reviewed-by: Tomasz Figa <t.figa at samsung.com>
---
 arch/arm/mach-exynos/cpuidle.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c
index 4d8bcfd..346c2d0 100644
--- a/arch/arm/mach-exynos/cpuidle.c
+++ b/arch/arm/mach-exynos/cpuidle.c
@@ -115,11 +115,10 @@ static int exynos_enter_core0_aftr(struct cpuidle_device *dev,
 	if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) {
 		tmp |= S5P_CENTRAL_LOWPWR_CFG;
 		__raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
+		/* Clear wakeup state register */
+		__raw_writel(0x0, S5P_WAKEUP_STAT);
 	}
 
-	/* Clear wakeup state register */
-	__raw_writel(0x0, S5P_WAKEUP_STAT);
-
 	return index;
 }
 
-- 
1.7.9.5




More information about the linux-arm-kernel mailing list