diff options
-rw-r--r-- | arch/arm/mach-mvebu/armada-370-xp.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/platsmp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/pmsu.c | 34 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/pmsu.h | 2 |
4 files changed, 20 insertions, 19 deletions
diff --git a/arch/arm/mach-mvebu/armada-370-xp.h b/arch/arm/mach-mvebu/armada-370-xp.h index 52c1603a4f92..84cd90d9b860 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.h +++ b/arch/arm/mach-mvebu/armada-370-xp.h | |||
@@ -25,6 +25,5 @@ extern struct smp_operations armada_xp_smp_ops; | |||
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | int armada_370_xp_pmsu_idle_enter(unsigned long deepidle); | 27 | int armada_370_xp_pmsu_idle_enter(unsigned long deepidle); |
28 | void armada_370_xp_pmsu_idle_exit(void); | ||
29 | 28 | ||
30 | #endif /* __MACH_ARMADA_370_XP_H */ | 29 | #endif /* __MACH_ARMADA_370_XP_H */ |
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index b6fa9f0c98b8..6da2b723d374 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c | |||
@@ -108,7 +108,7 @@ static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle) | |||
108 | */ | 108 | */ |
109 | static void armada_xp_secondary_init(unsigned int cpu) | 109 | static void armada_xp_secondary_init(unsigned int cpu) |
110 | { | 110 | { |
111 | armada_370_xp_pmsu_idle_exit(); | 111 | mvebu_v7_pmsu_idle_exit(); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void __init armada_xp_smp_init_cpus(void) | 114 | static void __init armada_xp_smp_init_cpus(void) |
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 272a9c0565b2..501d4503d859 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
@@ -73,7 +73,7 @@ extern void ll_enable_coherency(void); | |||
73 | 73 | ||
74 | extern void armada_370_xp_cpu_resume(void); | 74 | extern void armada_370_xp_cpu_resume(void); |
75 | 75 | ||
76 | static struct platform_device armada_xp_cpuidle_device = { | 76 | static struct platform_device mvebu_v7_cpuidle_device = { |
77 | .name = "cpuidle-armada-370-xp", | 77 | .name = "cpuidle-armada-370-xp", |
78 | }; | 78 | }; |
79 | 79 | ||
@@ -132,7 +132,7 @@ int mvebu_setup_boot_addr_wa(unsigned int crypto_eng_target, | |||
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | 134 | ||
135 | static int __init armada_370_xp_pmsu_init(void) | 135 | static int __init mvebu_v7_pmsu_init(void) |
136 | { | 136 | { |
137 | struct device_node *np; | 137 | struct device_node *np; |
138 | struct resource res; | 138 | struct resource res; |
@@ -176,7 +176,7 @@ static int __init armada_370_xp_pmsu_init(void) | |||
176 | return ret; | 176 | return ret; |
177 | } | 177 | } |
178 | 178 | ||
179 | static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void) | 179 | static void mvebu_v7_pmsu_enable_l2_powerdown_onidle(void) |
180 | { | 180 | { |
181 | u32 reg; | 181 | u32 reg; |
182 | 182 | ||
@@ -190,7 +190,7 @@ static void armada_370_xp_pmsu_enable_l2_powerdown_onidle(void) | |||
190 | } | 190 | } |
191 | 191 | ||
192 | /* No locking is needed because we only access per-CPU registers */ | 192 | /* No locking is needed because we only access per-CPU registers */ |
193 | static int armada_370_xp_prepare(unsigned long deepidle) | 193 | static int mvebu_v7_pmsu_idle_prepare(bool deepidle) |
194 | { | 194 | { |
195 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 195 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
196 | u32 reg; | 196 | u32 reg; |
@@ -233,7 +233,7 @@ int armada_370_xp_pmsu_idle_enter(unsigned long deepidle) | |||
233 | { | 233 | { |
234 | int ret; | 234 | int ret; |
235 | 235 | ||
236 | ret = armada_370_xp_prepare(deepidle); | 236 | ret = mvebu_v7_pmsu_idle_prepare(deepidle); |
237 | if (ret) | 237 | if (ret) |
238 | return ret; | 238 | return ret; |
239 | 239 | ||
@@ -272,7 +272,7 @@ static int armada_370_xp_cpu_suspend(unsigned long deepidle) | |||
272 | } | 272 | } |
273 | 273 | ||
274 | /* No locking is needed because we only access per-CPU registers */ | 274 | /* No locking is needed because we only access per-CPU registers */ |
275 | void armada_370_xp_pmsu_idle_exit(void) | 275 | void mvebu_v7_pmsu_idle_exit(void) |
276 | { | 276 | { |
277 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 277 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
278 | u32 reg; | 278 | u32 reg; |
@@ -294,24 +294,24 @@ void armada_370_xp_pmsu_idle_exit(void) | |||
294 | writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu)); | 294 | writel(reg, pmsu_mp_base + PMSU_STATUS_AND_MASK(hw_cpu)); |
295 | } | 295 | } |
296 | 296 | ||
297 | static int armada_370_xp_cpu_pm_notify(struct notifier_block *self, | 297 | static int mvebu_v7_cpu_pm_notify(struct notifier_block *self, |
298 | unsigned long action, void *hcpu) | 298 | unsigned long action, void *hcpu) |
299 | { | 299 | { |
300 | if (action == CPU_PM_ENTER) { | 300 | if (action == CPU_PM_ENTER) { |
301 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); | 301 | unsigned int hw_cpu = cpu_logical_map(smp_processor_id()); |
302 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_370_xp_cpu_resume); | 302 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_370_xp_cpu_resume); |
303 | } else if (action == CPU_PM_EXIT) { | 303 | } else if (action == CPU_PM_EXIT) { |
304 | armada_370_xp_pmsu_idle_exit(); | 304 | mvebu_v7_pmsu_idle_exit(); |
305 | } | 305 | } |
306 | 306 | ||
307 | return NOTIFY_OK; | 307 | return NOTIFY_OK; |
308 | } | 308 | } |
309 | 309 | ||
310 | static struct notifier_block armada_370_xp_cpu_pm_notifier = { | 310 | static struct notifier_block mvebu_v7_cpu_pm_notifier = { |
311 | .notifier_call = armada_370_xp_cpu_pm_notify, | 311 | .notifier_call = mvebu_v7_cpu_pm_notify, |
312 | }; | 312 | }; |
313 | 313 | ||
314 | static int __init armada_370_xp_cpu_pm_init(void) | 314 | static int __init mvebu_v7_cpu_pm_init(void) |
315 | { | 315 | { |
316 | struct device_node *np; | 316 | struct device_node *np; |
317 | 317 | ||
@@ -334,13 +334,13 @@ static int __init armada_370_xp_cpu_pm_init(void) | |||
334 | return 0; | 334 | return 0; |
335 | of_node_put(np); | 335 | of_node_put(np); |
336 | 336 | ||
337 | armada_370_xp_pmsu_enable_l2_powerdown_onidle(); | 337 | mvebu_v7_pmsu_enable_l2_powerdown_onidle(); |
338 | armada_xp_cpuidle_device.dev.platform_data = armada_370_xp_cpu_suspend; | 338 | mvebu_v7_cpuidle_device.dev.platform_data = armada_370_xp_cpu_suspend; |
339 | platform_device_register(&armada_xp_cpuidle_device); | 339 | platform_device_register(&mvebu_v7_cpuidle_device); |
340 | cpu_pm_register_notifier(&armada_370_xp_cpu_pm_notifier); | 340 | cpu_pm_register_notifier(&mvebu_v7_cpu_pm_notifier); |
341 | 341 | ||
342 | return 0; | 342 | return 0; |
343 | } | 343 | } |
344 | 344 | ||
345 | arch_initcall(armada_370_xp_cpu_pm_init); | 345 | arch_initcall(mvebu_v7_cpu_pm_init); |
346 | early_initcall(armada_370_xp_pmsu_init); | 346 | early_initcall(mvebu_v7_pmsu_init); |
diff --git a/arch/arm/mach-mvebu/pmsu.h b/arch/arm/mach-mvebu/pmsu.h index ae501948ec73..6b58c1fe2b0d 100644 --- a/arch/arm/mach-mvebu/pmsu.h +++ b/arch/arm/mach-mvebu/pmsu.h | |||
@@ -16,4 +16,6 @@ int mvebu_setup_boot_addr_wa(unsigned int crypto_eng_target, | |||
16 | unsigned int crypto_eng_attribute, | 16 | unsigned int crypto_eng_attribute, |
17 | phys_addr_t resume_addr_reg); | 17 | phys_addr_t resume_addr_reg); |
18 | 18 | ||
19 | void mvebu_v7_pmsu_idle_exit(void); | ||
20 | |||
19 | #endif /* __MACH_370_XP_PMSU_H */ | 21 | #endif /* __MACH_370_XP_PMSU_H */ |