diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-04-27 19:54:49 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-04-27 19:54:49 -0400 |
| commit | e4f5a3adc454745fea35f1c312e14cbeba6e0ea4 (patch) | |
| tree | 7dae08f7d3466fcf158808784ec3b706e6cafec6 | |
| parent | ae6208301e1e37a203fab817b59279a0f5d774c6 (diff) | |
| parent | a8e39c35b5d09598e129aa9b5e6f35aa3a1915d9 (diff) | |
Merge branch 'pm-cpuidle'
* pm-cpuidle: (51 commits)
cpuidle: add maintainer entry
ARM: s3c64xx: cpuidle: use init/exit common routine
SH: cpuidle: use init/exit common routine
cpuidle: fix comment format
ARM: imx: cpuidle: use init/exit common routine
ARM: davinci: cpuidle: use init/exit common routine
ARM: kirkwood: cpuidle: use init/exit common routine
ARM: calxeda: cpuidle: use init/exit common routine
ARM: tegra: cpuidle: use init/exit common routine for tegra3
ARM: tegra: cpuidle: use init/exit common routine for tegra2
ARM: OMAP4: cpuidle: use init/exit common routine
ARM: shmobile: cpuidle: use init/exit common routine
ARM: tegra: cpuidle: use init/exit common routine
ARM: OMAP3: cpuidle: use init/exit common routine
ARM: at91: cpuidle: use init/exit common routine
ARM: ux500: cpuidle: use init/exit common routine
cpuidle: make a single register function for all
ARM: ux500: cpuidle: replace for_each_online_cpu by for_each_possible_cpu
cpuidle: remove en_core_tk_irqen flag
ARM: OMAP3: remove cpuidle_wrap_enter
...
39 files changed, 362 insertions, 757 deletions
diff --git a/Documentation/cpuidle/driver.txt b/Documentation/cpuidle/driver.txt index 7a9e09ece931..1b0d81d92583 100644 --- a/Documentation/cpuidle/driver.txt +++ b/Documentation/cpuidle/driver.txt | |||
| @@ -15,11 +15,17 @@ has mechanisms in place to support actual entry-exit into CPU idle states. | |||
| 15 | cpuidle driver initializes the cpuidle_device structure for each CPU device | 15 | cpuidle driver initializes the cpuidle_device structure for each CPU device |
| 16 | and registers with cpuidle using cpuidle_register_device. | 16 | and registers with cpuidle using cpuidle_register_device. |
| 17 | 17 | ||
| 18 | If all the idle states are the same, the wrapper function cpuidle_register | ||
| 19 | could be used instead. | ||
| 20 | |||
| 18 | It can also support the dynamic changes (like battery <-> AC), by using | 21 | It can also support the dynamic changes (like battery <-> AC), by using |
| 19 | cpuidle_pause_and_lock, cpuidle_disable_device and cpuidle_enable_device, | 22 | cpuidle_pause_and_lock, cpuidle_disable_device and cpuidle_enable_device, |
| 20 | cpuidle_resume_and_unlock. | 23 | cpuidle_resume_and_unlock. |
| 21 | 24 | ||
| 22 | Interfaces: | 25 | Interfaces: |
| 26 | extern int cpuidle_register(struct cpuidle_driver *drv, | ||
| 27 | const struct cpumask *const coupled_cpus); | ||
| 28 | extern int cpuidle_unregister(struct cpuidle_driver *drv); | ||
| 23 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); | 29 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); |
| 24 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); | 30 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); |
| 25 | extern int cpuidle_register_device(struct cpuidle_device *dev); | 31 | extern int cpuidle_register_device(struct cpuidle_device *dev); |
diff --git a/MAINTAINERS b/MAINTAINERS index 8bdd7a7ef2f4..1bef08d407f3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -2206,6 +2206,15 @@ S: Maintained | |||
| 2206 | F: drivers/cpufreq/ | 2206 | F: drivers/cpufreq/ |
| 2207 | F: include/linux/cpufreq.h | 2207 | F: include/linux/cpufreq.h |
| 2208 | 2208 | ||
| 2209 | CPUIDLE DRIVERS | ||
| 2210 | M: Rafael J. Wysocki <rjw@sisk.pl> | ||
| 2211 | M: Daniel Lezcano <daniel.lezcano@linaro.org> | ||
| 2212 | L: linux-pm@vger.kernel.org | ||
| 2213 | S: Maintained | ||
| 2214 | T: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git | ||
| 2215 | F: drivers/cpuidle/* | ||
| 2216 | F: include/linux/cpuidle.h | ||
| 2217 | |||
| 2209 | CPUID/MSR DRIVER | 2218 | CPUID/MSR DRIVER |
| 2210 | M: "H. Peter Anvin" <hpa@zytor.com> | 2219 | M: "H. Peter Anvin" <hpa@zytor.com> |
| 2211 | S: Maintained | 2220 | S: Maintained |
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index 13482ea58b09..93f3794ba5cb 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig | |||
| @@ -56,7 +56,6 @@ CONFIG_AEABI=y | |||
| 56 | CONFIG_ZBOOT_ROM_TEXT=0x0 | 56 | CONFIG_ZBOOT_ROM_TEXT=0x0 |
| 57 | CONFIG_ZBOOT_ROM_BSS=0x0 | 57 | CONFIG_ZBOOT_ROM_BSS=0x0 |
| 58 | CONFIG_CPU_IDLE=y | 58 | CONFIG_CPU_IDLE=y |
| 59 | CONFIG_CPU_IDLE_KIRKWOOD=y | ||
| 60 | CONFIG_NET=y | 59 | CONFIG_NET=y |
| 61 | CONFIG_PACKET=y | 60 | CONFIG_PACKET=y |
| 62 | CONFIG_UNIX=y | 61 | CONFIG_UNIX=y |
diff --git a/arch/arm/mach-at91/cpuidle.c b/arch/arm/mach-at91/cpuidle.c index 0c6381516a5a..48f1228c611c 100644 --- a/arch/arm/mach-at91/cpuidle.c +++ b/arch/arm/mach-at91/cpuidle.c | |||
| @@ -27,8 +27,6 @@ | |||
| 27 | 27 | ||
| 28 | #define AT91_MAX_STATES 2 | 28 | #define AT91_MAX_STATES 2 |
| 29 | 29 | ||
| 30 | static DEFINE_PER_CPU(struct cpuidle_device, at91_cpuidle_device); | ||
| 31 | |||
| 32 | /* Actual code that puts the SoC in different idle states */ | 30 | /* Actual code that puts the SoC in different idle states */ |
| 33 | static int at91_enter_idle(struct cpuidle_device *dev, | 31 | static int at91_enter_idle(struct cpuidle_device *dev, |
| 34 | struct cpuidle_driver *drv, | 32 | struct cpuidle_driver *drv, |
| @@ -47,7 +45,6 @@ static int at91_enter_idle(struct cpuidle_device *dev, | |||
| 47 | static struct cpuidle_driver at91_idle_driver = { | 45 | static struct cpuidle_driver at91_idle_driver = { |
| 48 | .name = "at91_idle", | 46 | .name = "at91_idle", |
| 49 | .owner = THIS_MODULE, | 47 | .owner = THIS_MODULE, |
| 50 | .en_core_tk_irqen = 1, | ||
| 51 | .states[0] = ARM_CPUIDLE_WFI_STATE, | 48 | .states[0] = ARM_CPUIDLE_WFI_STATE, |
| 52 | .states[1] = { | 49 | .states[1] = { |
| 53 | .enter = at91_enter_idle, | 50 | .enter = at91_enter_idle, |
| @@ -61,20 +58,9 @@ static struct cpuidle_driver at91_idle_driver = { | |||
| 61 | }; | 58 | }; |
| 62 | 59 | ||
| 63 | /* Initialize CPU idle by registering the idle states */ | 60 | /* Initialize CPU idle by registering the idle states */ |
| 64 | static int at91_init_cpuidle(void) | 61 | static int __init at91_init_cpuidle(void) |
| 65 | { | 62 | { |
| 66 | struct cpuidle_device *device; | 63 | return cpuidle_register(&at91_idle_driver, NULL); |
| 67 | |||
| 68 | device = &per_cpu(at91_cpuidle_device, smp_processor_id()); | ||
| 69 | device->state_count = AT91_MAX_STATES; | ||
| 70 | |||
| 71 | cpuidle_register_driver(&at91_idle_driver); | ||
| 72 | |||
| 73 | if (cpuidle_register_device(device)) { | ||
| 74 | printk(KERN_ERR "at91_init_cpuidle: Failed registering\n"); | ||
| 75 | return -EIO; | ||
| 76 | } | ||
| 77 | return 0; | ||
| 78 | } | 64 | } |
| 79 | 65 | ||
| 80 | device_initcall(at91_init_cpuidle); | 66 | device_initcall(at91_init_cpuidle); |
diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c index 5ac9e9384b15..36aef3a7dedb 100644 --- a/arch/arm/mach-davinci/cpuidle.c +++ b/arch/arm/mach-davinci/cpuidle.c | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | 25 | ||
| 26 | #define DAVINCI_CPUIDLE_MAX_STATES 2 | 26 | #define DAVINCI_CPUIDLE_MAX_STATES 2 |
| 27 | 27 | ||
| 28 | static DEFINE_PER_CPU(struct cpuidle_device, davinci_cpuidle_device); | ||
| 29 | static void __iomem *ddr2_reg_base; | 28 | static void __iomem *ddr2_reg_base; |
| 30 | static bool ddr2_pdown; | 29 | static bool ddr2_pdown; |
| 31 | 30 | ||
| @@ -50,14 +49,10 @@ static void davinci_save_ddr_power(int enter, bool pdown) | |||
| 50 | 49 | ||
| 51 | /* Actual code that puts the SoC in different idle states */ | 50 | /* Actual code that puts the SoC in different idle states */ |
| 52 | static int davinci_enter_idle(struct cpuidle_device *dev, | 51 | static int davinci_enter_idle(struct cpuidle_device *dev, |
| 53 | struct cpuidle_driver *drv, | 52 | struct cpuidle_driver *drv, int index) |
| 54 | int index) | ||
