Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260626
b: refs/heads/master
c: e240ab1
h: refs/heads/master
v: v3
  • Loading branch information
Jaecheol Lee authored and Kukjin Kim committed Jul 20, 2011
1 parent ec88cf0 commit fb8f663
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4cf2d1495fc6030c6b01e266aaa125061f58d5b
refs/heads/master: e240ab1cfbf8e341c38847fe9aee8579a01ed303
40 changes: 19 additions & 21 deletions trunk/arch/arm/mach-exynos4/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,34 +210,13 @@ static struct sleep_save exynos4_l2cc_save[] = {
void exynos4_cpu_suspend(void)
{
unsigned long tmp;
unsigned long mask = 0xFFFFFFFF;

/* 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);

/* Setting Central Sequence option Register */

tmp = __raw_readl(S5P_CENTRAL_SEQ_OPTION);
tmp &= ~(S5P_USE_MASK);
tmp |= S5P_USE_STANDBY_WFI0;
__raw_writel(tmp, S5P_CENTRAL_SEQ_OPTION);

/* Clear all interrupt pending to avoid early wakeup */

__raw_writel(mask, (S5P_VA_GIC_DIST + 0x280));
__raw_writel(mask, (S5P_VA_GIC_DIST + 0x284));
__raw_writel(mask, (S5P_VA_GIC_DIST + 0x288));

/* Disable all interrupt */

__raw_writel(0x0, (S5P_VA_GIC_CPU + 0x000));
__raw_writel(0x0, (S5P_VA_GIC_DIST + 0x000));
__raw_writel(mask, (S5P_VA_GIC_DIST + 0x184));
__raw_writel(mask, (S5P_VA_GIC_DIST + 0x188));

outer_flush_all();

/* issue the standby signal into the pm unit. */
Expand Down Expand Up @@ -322,6 +301,22 @@ arch_initcall(exynos4_pm_drvinit);

static void exynos4_pm_resume(void)
{
unsigned long tmp;

/*
* If PMU failed while entering sleep mode, WFI will be
* ignored by PMU and then exiting cpu_do_idle().
* S5P_CENTRAL_LOWPWR_CFG bit will not be set automatically
* in this situation.
*/
tmp = __raw_readl(S5P_CENTRAL_SEQ_CONFIGURATION);
if (!(tmp & S5P_CENTRAL_LOWPWR_CFG)) {
tmp |= S5P_CENTRAL_LOWPWR_CFG;
__raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);
/* No need to perform below restore code */
goto early_wakeup;
}

/* For release retention */

__raw_writel((1 << 28), S5P_PAD_RET_MAUDIO_OPTION);
Expand All @@ -342,6 +337,9 @@ static void exynos4_pm_resume(void)
/* enable L2X0*/
writel_relaxed(1, S5P_VA_L2CC + L2X0_CTRL);
#endif

early_wakeup:
return;
}

static struct syscore_ops exynos4_pm_syscore_ops = {
Expand Down

0 comments on commit fb8f663

Please sign in to comment.