Skip to content

Commit

Permalink
ARM: EXYNOS4: Move S5P_CENTRAL_SEQ_CONFIGURATION setting for PM
Browse files Browse the repository at this point in the history
We need to balance between set and check S5P_CENTRAL_SEQ_CONFIGURATION
register in syscore_ops suspend/resume function when failure in enter
suspend mode. Moved this register setting for PM for the purpose of balancing.

Signed-off-by: Jaecheol Lee <jc.lee@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Jaecheol Lee authored and Kukjin Kim committed Jul 20, 2011
1 parent e240ab1 commit 12974e9
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions arch/arm/mach-exynos4/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,6 @@ static struct sleep_save exynos4_l2cc_save[] = {

void exynos4_cpu_suspend(void)
{
unsigned long tmp;

/* Setting Central Sequence Register for power down mode */

tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
tmp &= ~(S5P_CENTRAL_LOWPWR_CFG);
__raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);

outer_flush_all();

/* issue the standby signal into the pm unit. */
Expand Down Expand Up @@ -299,6 +291,19 @@ static __init int exynos4_pm_drvinit(void)
}
arch_initcall(exynos4_pm_drvinit);

static int exynos4_pm_suspend(void)
{
unsigned long tmp;

/* Setting Central Sequence Register for power down mode */

tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
tmp &= ~S5P_CENTRAL_LOWPWR_CFG;
__raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);

return 0;
}

static void exynos4_pm_resume(void)
{
unsigned long tmp;
Expand Down Expand Up @@ -343,6 +348,7 @@ static void exynos4_pm_resume(void)
}

static struct syscore_ops exynos4_pm_syscore_ops = {
.suspend = exynos4_pm_suspend,
.resume = exynos4_pm_resume,
};

Expand Down

0 comments on commit 12974e9

Please sign in to comment.