diff options
-rw-r--r-- | arch/arm/mach-ux500/cpuidle.c | 17 | ||||
-rw-r--r-- | drivers/mfd/db8500-prcmu.c | 4 |
2 files changed, 15 insertions, 6 deletions
diff --git a/arch/arm/mach-ux500/cpuidle.c b/arch/arm/mach-ux500/cpuidle.c index a45dd09daed9..c0cb37c8086c 100644 --- a/arch/arm/mach-ux500/cpuidle.c +++ b/arch/arm/mach-ux500/cpuidle.c | |||
@@ -16,12 +16,12 @@ | |||
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 "db8500-regs.h" |
24 | #include "id.h" | ||
25 | 25 | ||
26 | static atomic_t master = ATOMIC_INIT(0); | 26 | static atomic_t master = ATOMIC_INIT(0); |
27 | static DEFINE_SPINLOCK(master_lock); | 27 | static DEFINE_SPINLOCK(master_lock); |
@@ -113,11 +113,8 @@ static struct cpuidle_driver ux500_idle_driver = { | |||
113 | .state_count = 2, | 113 | .state_count = 2, |
114 | }; | 114 | }; |
115 | 115 | ||
116 | int __init ux500_idle_init(void) | 116 | static int __init dbx500_cpuidle_probe(struct platform_device *pdev) |
117 | { | 117 | { |
118 | if (!(cpu_is_u8500_family() || cpu_is_ux540_family())) | ||
119 | return -ENODEV; | ||
120 | |||
121 | /* Configure wake up reasons */ | 118 | /* Configure wake up reasons */ |
122 | prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | | 119 | prcmu_enable_wakeups(PRCMU_WAKEUP(ARM) | PRCMU_WAKEUP(RTC) | |
123 | PRCMU_WAKEUP(ABB)); | 120 | PRCMU_WAKEUP(ABB)); |
@@ -125,4 +122,12 @@ int __init ux500_idle_init(void) | |||
125 | return cpuidle_register(&ux500_idle_driver, NULL); | 122 | return cpuidle_register(&ux500_idle_driver, NULL); |
126 | } | 123 | } |
127 | 124 | ||
128 | device_initcall(ux500_idle_init); | 125 | static struct platform_driver dbx500_cpuidle_plat_driver = { |
126 | .driver = { | ||
127 | .name = "cpuidle-dbx500", | ||
128 | .owner = THIS_MODULE, | ||
129 | }, | ||
130 | .probe = dbx500_cpuidle_probe, | ||
131 | }; | ||
132 | |||
133 | module_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, |