aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-davinci/cpuidle.c2
-rw-r--r--arch/arm/mach-ux500/Makefile1
-rw-r--r--drivers/cpuidle/Kconfig20
-rw-r--r--drivers/cpuidle/Kconfig.arm29
-rw-r--r--drivers/cpuidle/Makefile9
-rw-r--r--drivers/cpuidle/cpuidle-ux500.c (renamed from arch/arm/mach-ux500/cpuidle.c)19
-rw-r--r--drivers/mfd/db8500-prcmu.c4
7 files changed, 58 insertions, 26 deletions
diff --git a/arch/arm/mach-davinci/cpuidle.c b/arch/arm/mach-davinci/cpuidle.c
index 36aef3a7dedb..f1ac1c94ac0f 100644
--- a/arch/arm/mach-davinci/cpuidle.c
+++ b/arch/arm/mach-davinci/cpuidle.c
@@ -65,7 +65,7 @@ static struct cpuidle_driver davinci_idle_driver = {
65 .states[1] = { 65 .states[1] = {
66 .enter = davinci_enter_idle, 66 .enter = davinci_enter_idle,
67 .exit_latency = 10, 67 .exit_latency = 10,
68 .target_residency = 100000, 68 .target_residency = 10000,
69 .flags = CPUIDLE_FLAG_TIME_VALID, 69 .flags = CPUIDLE_FLAG_TIME_VALID,
70 .name = "DDR SR", 70 .name = "DDR SR",
71 .desc = "WFI and DDR Self Refresh", 71 .desc = "WFI and DDR Self Refresh",
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index bf9b6be5b180..fe1f3e26b88b 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -4,7 +4,6 @@
4 4
5obj-y := cpu.o devices.o devices-common.o \ 5obj-y := cpu.o devices.o devices-common.o \
6 id.o usb.o timer.o pm.o 6 id.o usb.o timer.o pm.o
7obj-$(CONFIG_CPU_IDLE) += cpuidle.o
8obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o 7obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
9obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o 8obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
10obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \ 9obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index 0e2cd5cab4d0..b3fb81d7cf04 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -1,5 +1,6 @@
1menu "CPU Idle"
1 2
2menuconfig CPU_IDLE 3config CPU_IDLE
3 bool "CPU idle PM support" 4 bool "CPU idle PM support"
4 default y if ACPI || PPC_PSERIES 5 default y if ACPI || PPC_PSERIES
5 select CPU_IDLE_GOV_LADDER if (!NO_HZ && !NO_HZ_IDLE) 6 select CPU_IDLE_GOV_LADDER if (!NO_HZ && !NO_HZ_IDLE)
@@ -29,20 +30,13 @@ config CPU_IDLE_GOV_MENU
29 bool "Menu governor (for tickless system)" 30 bool "Menu governor (for tickless system)"
30 default y 31 default y
31 32
32config CPU_IDLE_CALXEDA 33menu "ARM CPU Idle Drivers"
33 bool "CPU Idle Driver for Calxeda processors" 34depends on ARM
34 depends on ARCH_HIGHBANK 35source "drivers/cpuidle/Kconfig.arm"
35 select ARM_CPU_SUSPEND 36endmenu
36 help
37 Select this to enable cpuidle on Calxeda processors.
38
39config CPU_IDLE_ZYNQ
40 bool "CPU Idle Driver for Xilinx Zynq processors"
41 depends on ARCH_ZYNQ
42 help
43 Select this to enable cpuidle on Xilinx Zynq processors.
44 37
45endif 38endif
46 39
47config ARCH_NEEDS_CPU_IDLE_COUPLED 40config ARCH_NEEDS_CPU_IDLE_COUPLED
48 def_bool n 41 def_bool n
42endmenu
diff --git a/drivers/cpuidle/Kconfig.arm b/drivers/cpuidle/Kconfig.arm
new file mode 100644
index 000000000000..b3302193c15a
--- /dev/null
+++ b/drivers/cpuidle/Kconfig.arm
@@ -0,0 +1,29 @@
1#
2# ARM CPU Idle drivers
3#
4
5config ARM_HIGHBANK_CPUIDLE
6 bool "CPU Idle Driver for Calxeda processors"
7 depends on ARCH_HIGHBANK
8 select ARM_CPU_SUSPEND
9 help
10 Select this to enable cpuidle on Calxeda processors.
11
12config ARM_KIRKWOOD_CPUIDLE
13 bool "CPU Idle Driver for Marvell Kirkwood SoCs"
14 depends on ARCH_KIRKWOOD
15 help
16 This adds the CPU Idle driver for Marvell Kirkwood SoCs.
17
18config ARM_ZYNQ_CPUIDLE
19 bool "CPU Idle Driver for Xilinx Zynq processors"
20 depends on ARCH_ZYNQ
21 help
22 Select this to enable cpuidle on Xilinx Zynq processors.
23
24config ARM_U8500_CPUIDLE
25 bool "Cpu Idle Driver for the ST-E u8500 processors"
26 depends on ARCH_U8500
27 help
28 Select this to enable cpuidle for ST-E u8500 processors
29
diff --git a/drivers/cpuidle/Makefile b/drivers/cpuidle/Makefile
index 8767a7b3eb91..0b9d200c7e45 100644
--- a/drivers/cpuidle/Makefile
+++ b/drivers/cpuidle/Makefile
@@ -5,6 +5,9 @@
5obj-y += cpuidle.o driver.o governor.o sysfs.o governors/ 5obj-y += cpuidle.o driver.o governor.o sysfs.o governors/
6obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o 6obj-$(CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED) += coupled.o
7 7
8obj-$(CONFIG_CPU_IDLE_CALXEDA) += cpuidle-calxeda.o 8##################################################################################
9obj-$(CONFIG_ARCH_KIRKWOOD) += cpuidle-kirkwood.o 9# ARM SoC drivers
10obj-$(CONFIG_CPU_IDLE_ZYNQ) += cpuidle-zynq.o 10obj-$(CONFIG_ARM_HIGHBANK_CPUIDLE) += cpuidle-calxeda.o
11obj-$(CONFIG_ARM_KIRKWOOD_CPUIDLE) += cpuidle-kirkwood.o
12obj-$(CONFIG_ARM_ZYNQ_CPUIDLE) += cpuidle-zynq.o
13obj-$(CONFIG_ARM_U8500_CPUIDLE) += cpuidle-ux500.o
diff --git a/arch/arm/mach-ux500/cpuidle.c b/drivers/cpuidle/cpuidle-ux500.c
index a45dd09daed9..e0564652af35 100644
--- a/arch/arm/mach-ux500/cpuidle.c
+++ b/drivers/cpuidle/cpuidle-ux500.c
@@ -16,13 +16,11 @@
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <linux/mfd/dbx500-prcmu.h> 17#include <linux/mfd/dbx500-prcmu.h>
18#include <linux/platform_data/arm-ux500-pm.h> 18#include <linux/platform_data/arm-ux500-pm.h>
19#include <linux/platform_device.h>
19 20
20#include <asm/cpuidle.h> 21#include <asm/cpuidle.h>
21#include <asm/proc-fns.h> 22#include <asm/proc-fns.h>
22 23
23#include "db8500-regs.h"
24#include "id.h"
25
26static atomic_t master = ATOMIC_INIT(0); 24static atomic_t master = ATOMIC_INIT(0);
27static DEFINE_SPINLOCK(master_lock); 25static DEFINE_SPINLOCK(master_lock);
28 26
@@ -113,11 +111,8 @@ static struct cpuidle_driver ux500_idle_driver = {
113 .state_count = 2, 111 .state_count = 2,
114}; 112};
115 113
116int __init ux500_idle_init(void) 114static int __init dbx500_cpuidle_probe(struct platform_device *pdev)
117{ 115{
118 if (!(cpu_is_u8500_family() || cpu_is_ux540_family()))
119 return -ENODEV;
120
121 /* Configure wake up reasons */ 116 /* Configure wake up reasons */
122 prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | 117 prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) |
123 PRCMU_WAKEUP(ABB)); 118 PRCMU_WAKEUP(ABB));
@@ -125,4 +120,12 @@ int __init ux500_idle_init(void)
125 return cpuidle_register(&ux500_idle_driver, NULL); 120 return cpuidle_register(&ux500_idle_driver, NULL);
126} 121}
127 122
128device_initcall(ux500_idle_init); 123static struct platform_driver dbx500_cpuidle_plat_driver = {
124 .driver = {
125 .name = "cpuidle-dbx500",
126 .owner = THIS_MODULE,
127 },
128 .probe = dbx500_cpuidle_probe,
129};
130
131module_platform_driver(dbx500_cpuidle_plat_driver);
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 3c157faee645..0d68eb1a5ec5 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -3094,6 +3094,10 @@ static struct mfd_cell db8500_prcmu_devs[] = {
3094 .pdata_size = sizeof(db8500_cpufreq_table), 3094 .pdata_size = sizeof(db8500_cpufreq_table),
3095 }, 3095 },
3096 { 3096 {
3097 .name = "cpuidle-dbx500",
3098 .of_compatible = "stericsson,cpuidle-dbx500",
3099 },
3100 {
3097 .name = "db8500-thermal", 3101 .name = "db8500-thermal",
3098 .num_resources = ARRAY_SIZE(db8500_thsens_resources), 3102 .num_resources = ARRAY_SIZE(db8500_thsens_resources),
3099 .resources = db8500_thsens_resources, 3103 .resources = db8500_thsens_resources,