diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 15:02:27 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 15:02:27 -0400 |
| commit | 1fdb24e969110fafea36d3b393bea438f702c87f (patch) | |
| tree | 47a1dfef8a259e7922285315f8a02d31b4efe2f1 /include/linux | |
| parent | f362f98e7c445643d27c610bb7a86b79727b592e (diff) | |
| parent | 531a6a941745e1e045dd2a6bd09e1dc01247a5f3 (diff) | |
Merge branch 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm
* 'devel-stable' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (178 commits)
ARM: 7139/1: fix compilation with CONFIG_ARM_ATAG_DTB_COMPAT and large TEXT_OFFSET
ARM: gic, local timers: use the request_percpu_irq() interface
ARM: gic: consolidate PPI handling
ARM: switch from NO_MACH_MEMORY_H to NEED_MACH_MEMORY_H
ARM: mach-s5p64x0: remove mach/memory.h
ARM: mach-s3c64xx: remove mach/memory.h
ARM: plat-mxc: remove mach/memory.h
ARM: mach-prima2: remove mach/memory.h
ARM: mach-zynq: remove mach/memory.h
ARM: mach-bcmring: remove mach/memory.h
ARM: mach-davinci: remove mach/memory.h
ARM: mach-pxa: remove mach/memory.h
ARM: mach-ixp4xx: remove mach/memory.h
ARM: mach-h720x: remove mach/memory.h
ARM: mach-vt8500: remove mach/memory.h
ARM: mach-s5pc100: remove mach/memory.h
ARM: mach-tegra: remove mach/memory.h
ARM: plat-tcc: remove mach/memory.h
ARM: mach-mmp: remove mach/memory.h
ARM: mach-cns3xxx: remove mach/memory.h
...
Fix up mostly pretty trivial conflicts in:
- arch/arm/Kconfig
- arch/arm/include/asm/localtimer.h
- arch/arm/kernel/Makefile
- arch/arm/mach-shmobile/board-ap4evb.c
- arch/arm/mach-u300/core.c
- arch/arm/mm/dma-mapping.c
- arch/arm/mm/proc-v7.S
- arch/arm/plat-omap/Kconfig
largely due to some CONFIG option renaming (ie CONFIG_PM_SLEEP ->
CONFIG_ARM_CPU_SUSPEND for the arm-specific suspend code etc) and
addition of NEED_MACH_MEMORY_H next to HAVE_IDE.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpu_pm.h | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/include/linux/cpu_pm.h b/include/linux/cpu_pm.h new file mode 100644 index 000000000000..455b233dd3b1 --- /dev/null +++ b/include/linux/cpu_pm.h | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2011 Google, Inc. | ||
| 3 | * | ||
| 4 | * Author: | ||
| 5 | * Colin Cross <ccross@android.com> | ||
| 6 | * | ||
| 7 | * This software is licensed under the terms of the GNU General Public | ||
| 8 | * License version 2, as published by the Free Software Foundation, and | ||
| 9 | * may be copied, distributed, and modified under those terms. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef _LINUX_CPU_PM_H | ||
| 19 | #define _LINUX_CPU_PM_H | ||
| 20 | |||
| 21 | #include <linux/kernel.h> | ||
| 22 | #include <linux/notifier.h> | ||
| 23 | |||
| 24 | /* | ||
| 25 | * When a CPU goes to a low power state that turns off power to the CPU's | ||
| 26 | * power domain, the contents of some blocks (floating point coprocessors, | ||
| 27 | * interrupt controllers, caches, timers) in the same power domain can | ||
| 28 | * be lost. The cpm_pm notifiers provide a method for platform idle, suspend, | ||
| 29 | * and hotplug implementations to notify the drivers for these blocks that | ||
| 30 | * they may be reset. | ||
| 31 | * | ||
| 32 | * All cpu_pm notifications must be called with interrupts disabled. | ||
| 33 | * | ||
| 34 | * The notifications are split into two classes: CPU notifications and CPU | ||
| 35 | * cluster notifications. | ||
| 36 | * | ||
| 37 | * CPU notifications apply to a single CPU and must be called on the affected | ||
| 38 | * CPU. They are used to save per-cpu context for affected blocks. | ||
| 39 | * | ||
| 40 | * CPU cluster notifications apply to all CPUs in a single power domain. They | ||
| 41 | * are used to save any global context for affected blocks, and must be called | ||
| 42 | * after all the CPUs in the power domain have been notified of the low power | ||
| 43 | * state. | ||
| 44 | */ | ||
| 45 | |||
| 46 | /* | ||
| 47 | * Event codes passed as unsigned long val to notifier calls | ||
| 48 | */ | ||
| 49 | enum cpu_pm_event { | ||
| 50 | /* A single cpu is entering a low power state */ | ||
| 51 | CPU_PM_ENTER, | ||
| 52 | |||
| 53 | /* A single cpu failed to enter a low power state */ | ||
| 54 | CPU_PM_ENTER_FAILED, | ||
| 55 | |||
| 56 | /* A single cpu is exiting a low power state */ | ||
| 57 | CPU_PM_EXIT, | ||
| 58 | |||
| 59 | /* A cpu power domain is entering a low power state */ | ||
| 60 | CPU_CLUSTER_PM_ENTER, | ||
| 61 | |||
| 62 | /* A cpu power domain failed to enter a low power state */ | ||
| 63 | CPU_CLUSTER_PM_ENTER_FAILED, | ||
| 64 | |||
| 65 | /* A cpu power domain is exiting a low power state */ | ||
| 66 | CPU_CLUSTER_PM_EXIT, | ||
| 67 | }; | ||
| 68 | |||
| 69 | #ifdef CONFIG_CPU_PM | ||
| 70 | int cpu_pm_register_notifier(struct notifier_block *nb); | ||
| 71 | int cpu_pm_unregister_notifier(struct notifier_block *nb); | ||
| 72 | int cpu_pm_enter(void); | ||
| 73 | int cpu_pm_exit(void); | ||
| 74 | int cpu_cluster_pm_enter(void); | ||
| 75 | int cpu_cluster_pm_exit(void); | ||
| 76 | |||
| 77 | #else | ||
| 78 | |||
| 79 | static inline int cpu_pm_register_notifier(struct notifier_block *nb) | ||
| 80 | { | ||
| 81 | return 0; | ||
| 82 | } | ||
| 83 | |||
| 84 | static inline int cpu_pm_unregister_notifier(struct notifier_block *nb) | ||
| 85 | { | ||
| 86 | return 0; | ||
| 87 | } | ||
| 88 | |||
| 89 | static inline int cpu_pm_enter(void) | ||
| 90 | { | ||
| 91 | return 0; | ||
| 92 | } | ||
| 93 | |||
| 94 | static inline int cpu_pm_exit(void) | ||
| 95 | { | ||
| 96 | return 0; | ||
| 97 | } | ||
| 98 | |||
| 99 | static inline int cpu_cluster_pm_enter(void) | ||
| 100 | { | ||
| 101 | return 0; | ||
| 102 | } | ||
| 103 | |||
| 104 | static inline int cpu_cluster_pm_exit(void) | ||
| 105 | { | ||
| 106 | return 0; | ||
| 107 | } | ||
| 108 | #endif | ||
| 109 | #endif | ||
