Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260628
b: refs/heads/master
c: f4ba4b0
h: refs/heads/master
v: v3
  • Loading branch information
Jaecheol Lee authored and Kukjin Kim committed Jul 20, 2011
1 parent 58e6035 commit cb6b189
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 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: 12974e9f707888044a3af3a12ebdebf0a509a1fa
refs/heads/master: f4ba4b01ef28100070608d915feda173d2a61c0c
26 changes: 25 additions & 1 deletion trunk/arch/arm/mach-exynos4/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ static struct sleep_save exynos4_l2cc_save[] = {
SAVE_ITEM(S5P_VA_L2CC + L2X0_AUX_CTRL),
};

void exynos4_cpu_suspend(void)
/* For Cortex-A9 Diagnostic and Power control register */
static unsigned int save_arm_register[2];

void exynos4_cpu_suspend(unsigned long arg)
{
outer_flush_all();

Expand Down Expand Up @@ -301,6 +304,16 @@ static int exynos4_pm_suspend(void)
tmp &= ~S5P_CENTRAL_LOWPWR_CFG;
__raw_writel(tmp, S5P_CENTRAL_SEQ_CONFIGURATION);

/* Save Power control register */
asm ("mrc p15, 0, %0, c15, c0, 0"
: "=r" (tmp) : : "cc");
save_arm_register[0] = tmp;

/* Save Diagnostic register */
asm ("mrc p15, 0, %0, c15, c0, 1"
: "=r" (tmp) : : "cc");
save_arm_register[1] = tmp;

return 0;
}

Expand All @@ -321,6 +334,17 @@ static void exynos4_pm_resume(void)
/* No need to perform below restore code */
goto early_wakeup;
}
/* Restore Power control register */
tmp = save_arm_register[0];
asm volatile ("mcr p15, 0, %0, c15, c0, 0"
: : "r" (tmp)
: "cc");

/* Restore Diagnostic register */
tmp = save_arm_register[1];
asm volatile ("mcr p15, 0, %0, c15, c0, 1"
: : "r" (tmp)
: "cc");

/* For release retention */

Expand Down

0 comments on commit cb6b189

Please sign in to comment.