diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/pm-sh7372.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 7fda2301c9b2..77b8fc12fc2f 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -239,7 +239,6 @@ struct sh7372_pm_domain sh7372_d4 = { | |||
239 | struct sh7372_pm_domain sh7372_a4r = { | 239 | struct sh7372_pm_domain sh7372_a4r = { |
240 | .genpd.name = "A4R", | 240 | .genpd.name = "A4R", |
241 | .bit_shift = 5, | 241 | .bit_shift = 5, |
242 | .gov = &pm_domain_always_on_gov, | ||
243 | .suspend = sh7372_a4r_suspend, | 242 | .suspend = sh7372_a4r_suspend, |
244 | .resume = sh7372_intcs_resume, | 243 | .resume = sh7372_intcs_resume, |
245 | }; | 244 | }; |
@@ -535,9 +534,37 @@ static int sh7372_enter_suspend(suspend_state_t suspend_state) | |||
535 | return 0; | 534 | return 0; |
536 | } | 535 | } |
537 | 536 | ||
537 | /** | ||
538 | * sh7372_pm_notifier_fn - SH7372 PM notifier routine. | ||
539 | * @notifier: Unused. | ||
540 | * @pm_event: Event being handled. | ||
541 | * @unused: Unused. | ||
542 | */ | ||
543 | static int sh7372_pm_notifier_fn(struct notifier_block *notifier, | ||
544 | unsigned long pm_event, void *unused) | ||
545 | { | ||
546 | switch (pm_event) { | ||
547 | case PM_SUSPEND_PREPARE: | ||
548 | /* | ||
549 | * This is necessary, because the A4R domain has to be "on" | ||
550 | * when suspend_device_irqs() and resume_device_irqs() are | ||
551 | * executed during system suspend and resume, respectively, so | ||
552 | * that those functions don't crash while accessing the INTCS. | ||
553 | */ | ||
554 | pm_genpd_poweron(&sh7372_a4r.genpd); | ||
555 | break; | ||
556 | case PM_POST_SUSPEND: | ||
557 | pm_genpd_poweroff_unused(); | ||
558 | break; | ||
559 | } | ||
560 | |||
561 | return NOTIFY_DONE; | ||
562 | } | ||
563 | |||
538 | static void sh7372_suspend_init(void) | 564 | static void sh7372_suspend_init(void) |
539 | { | 565 | { |
540 | shmobile_suspend_ops.enter = sh7372_enter_suspend; | 566 | shmobile_suspend_ops.enter = sh7372_enter_suspend; |
567 | pm_notifier(sh7372_pm_notifier_fn, 0); | ||
541 | } | 568 | } |
542 | #else | 569 | #else |
543 | static void sh7372_suspend_init(void) {} | 570 | static void sh7372_suspend_init(void) {} |