Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328691
b: refs/heads/master
c: 70fe7b2
h: refs/heads/master
i:
  328689: 7f750cc
  328687: b03059a
v: v3
  • Loading branch information
Rafael J. Wysocki committed Sep 3, 2012
1 parent 204a326 commit 029519d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 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: 0d09f450b6ee2065436df9fd4e0f83f9b6d71eaa
refs/heads/master: 70fe7b24672a988f8aab77a04329d6331a1f10a8
17 changes: 14 additions & 3 deletions trunk/arch/arm/mach-shmobile/pm-sh7372.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,33 @@ struct rmobile_pm_domain sh7372_pd_a3ri = {
.bit_shift = 8,
};

static bool a4s_suspend_ready;

static int sh7372_pd_a4s_suspend(void)
{
/*
* The A4S domain contains the CPU core and therefore it should
* only be turned off if the CPU is in use.
* only be turned off if the CPU is not in use. This may happen
* during system suspend, when SYSC is going to be used for generating
* resume signals and a4s_suspend_ready is set to let
* sh7372_enter_suspend() know that it can turn A4S off.
*/
a4s_suspend_ready = true;
return -EBUSY;
}

static void sh7372_pd_a4s_resume(void)
{
a4s_suspend_ready = false;
}

struct rmobile_pm_domain sh7372_pd_a4s = {
.genpd.name = "A4S",
.bit_shift = 10,
.gov = &pm_domain_always_on_gov,
.no_debug = true,
.suspend = sh7372_pd_a4s_suspend,
.resume = sh7372_pd_a4s_resume,
};

static int sh7372_a3sp_pd_suspend(void)
Expand Down Expand Up @@ -390,8 +402,7 @@ static int sh7372_enter_suspend(suspend_state_t suspend_state)

/* check active clocks to determine potential wakeup sources */
if (sh7372_sysc_valid(&msk, &msk2)) {
if (!console_suspend_enabled &&
sh7372_pd_a4s.genpd.status == GPD_STATE_POWER_OFF) {
if (!console_suspend_enabled && a4s_suspend_ready) {
/* convert INTC mask/sense to SYSC mask/sense */
sh7372_setup_sysc(msk, msk2);

Expand Down

0 comments on commit 029519d

Please sign in to comment.