diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-17 14:25:18 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-17 14:25:18 -0400 |
commit | 00e8b2613331042bbe0177e5b9bb5c8a654b14ae (patch) | |
tree | cfec260ba68b007ddd090c8f63c879b5bb58d2c4 /kernel | |
parent | 5698bd757d55b1bb87edd1a9744ab09c142abfc2 (diff) | |
parent | feb70af0e3ac6817327be70b47731039ea135dbc (diff) |
Merge branch 'pm-timers'
* pm-timers:
PM: Do not use the syscore flag for runtime PM
sh: MTU2: Basic runtime PM support
sh: CMT: Basic runtime PM support
sh: TMU: Basic runtime PM support
PM / Domains: Do not measure start time for "irq safe" devices
PM / Domains: Move syscore flag from subsys data to struct device
PM / Domains: Rename the always_on device flag to syscore
PM / Runtime: Allow helpers to be called by early platform drivers
PM: Reorganize device PM initialization
sh: MTU2: Introduce clock events suspend/resume routines
sh: CMT: Introduce clocksource/clock events suspend/resume routines
sh: TMU: Introduce clocksource/clock events suspend/resume routines
timekeeping: Add suspend and resume of clock event devices
PM / Domains: Add power off/on function for system core suspend stage
PM / Domains: Introduce simplified power on routine for system resume
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/Kconfig | 4 | ||||
-rw-r--r-- | kernel/time/clockevents.c | 24 | ||||
-rw-r--r-- | kernel/time/timekeeping.c | 2 |
3 files changed, 30 insertions, 0 deletions
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index a70518c9d82f..5dfdc9ea180b 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -263,6 +263,10 @@ config PM_GENERIC_DOMAINS | |||
263 | bool | 263 | bool |
264 | depends on PM | 264 | depends on PM |
265 | 265 | ||
266 | config PM_GENERIC_DOMAINS_SLEEP | ||
267 | def_bool y | ||
268 | depends on PM_SLEEP && PM_GENERIC_DOMAINS | ||
269 | |||
266 | config PM_GENERIC_DOMAINS_RUNTIME | 270 | config PM_GENERIC_DOMAINS_RUNTIME |
267 | def_bool y | 271 | def_bool y |
268 | depends on PM_RUNTIME && PM_GENERIC_DOMAINS | 272 | depends on PM_RUNTIME && PM_GENERIC_DOMAINS |
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 7e1ce012a851..30b6de0d977c 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -397,6 +397,30 @@ void clockevents_exchange_device(struct clock_event_device *old, | |||
397 | local_irq_restore(flags); | 397 | local_irq_restore(flags); |
398 | } | 398 | } |
399 | 399 | ||
400 | /** | ||
401 | * clockevents_suspend - suspend clock devices | ||
402 | */ | ||
403 | void clockevents_suspend(void) | ||
404 | { | ||
405 | struct clock_event_device *dev; | ||
406 | |||
407 | list_for_each_entry_reverse(dev, &clockevent_devices, list) | ||
408 | if (dev->suspend) | ||
409 | dev->suspend(dev); | ||
410 | } | ||
411 | |||
412 | /** | ||
413 | * clockevents_resume - resume clock devices | ||
414 | */ | ||
415 | void clockevents_resume(void) | ||
416 | { | ||
417 | struct clock_event_device *dev; | ||
418 | |||
419 | list_for_each_entry(dev, &clockevent_devices, list) | ||
420 | if (dev->resume) | ||
421 | dev->resume(dev); | ||
422 | } | ||
423 | |||
400 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 424 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
401 | /** | 425 | /** |
402 | * clockevents_notify - notification about relevant events | 426 | * clockevents_notify - notification about relevant events |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 34e5eac81424..312a675cb240 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -773,6 +773,7 @@ static void timekeeping_resume(void) | |||
773 | 773 | ||
774 | read_persistent_clock(&ts); | 774 | read_persistent_clock(&ts); |
775 | 775 | ||
776 | clockevents_resume(); | ||
776 | clocksource_resume(); | 777 | clocksource_resume(); |
777 | 778 | ||
778 | write_seqlock_irqsave(&tk->lock, flags); | 779 | write_seqlock_irqsave(&tk->lock, flags); |
@@ -832,6 +833,7 @@ static int timekeeping_suspend(void) | |||
832 | 833 | ||
833 | clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); | 834 | clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); |
834 | clocksource_suspend(); | 835 | clocksource_suspend(); |
836 | clockevents_suspend(); | ||
835 | 837 | ||
836 | return 0; | 838 | return 0; |
837 | } | 839 | } |