aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2014-04-17 11:58:39 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2014-05-25 18:48:12 -0400
commit166aaf396654b533f536f2cf84d7558eb42f1c9f (patch)
treeeb9b0ce90ea4aa745de4c7ef0d3a7a8ec1a36593
parent9581960a40ab0e281b695bf03744c8924ec3b5d0 (diff)
ARM: 8029/1: mcpm: Rename the power_down_finish() functions to be less confusing
The name "power_down_finish" seems to be causing some confusion, because it suggests that this function is responsible for taking some action to cause the specified CPU to complete its power down. This patch renames the affected functions to "wait_for_powerdown" and similar, since this function's intended purpose is just to wait for the hardware to finish a powerdown initiated by a previous cpu_power_down. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/common/mcpm_entry.c6
-rw-r--r--arch/arm/common/mcpm_platsmp.c2
-rw-r--r--arch/arm/include/asm/mcpm.h8
-rw-r--r--arch/arm/mach-vexpress/tc2_pm.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
index 1e361abc29eb..7522c87e82fc 100644
--- a/arch/arm/common/mcpm_entry.c
+++ b/arch/arm/common/mcpm_entry.c
@@ -101,14 +101,14 @@ void mcpm_cpu_power_down(void)
101 BUG(); 101 BUG();
102} 102}
103 103
104int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster) 104int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster)
105{ 105{
106 int ret; 106 int ret;
107 107
108 if (WARN_ON_ONCE(!platform_ops || !platform_ops->power_down_finish)) 108 if (WARN_ON_ONCE(!platform_ops || !platform_ops->wait_for_powerdown))
109 return -EUNATCH; 109 return -EUNATCH;
110 110
111 ret = platform_ops->power_down_finish(cpu, cluster); 111 ret = platform_ops->wait_for_powerdown(cpu, cluster);
112 if (ret) 112 if (ret)
113 pr_warn("%s: cpu %u, cluster %u failed to power down (%d)\n", 113 pr_warn("%s: cpu %u, cluster %u failed to power down (%d)\n",
114 __func__, cpu, cluster, ret); 114 __func__, cpu, cluster, ret);
diff --git a/arch/arm/common/mcpm_platsmp.c b/arch/arm/common/mcpm_platsmp.c
index 177251a4dd9a..92e54d7c6f46 100644
--- a/arch/arm/common/mcpm_platsmp.c
+++ b/arch/arm/common/mcpm_platsmp.c
@@ -62,7 +62,7 @@ static int mcpm_cpu_kill(unsigned int cpu)
62 62
63 cpu_to_pcpu(cpu, &pcpu, &pcluster); 63 cpu_to_pcpu(cpu, &pcpu, &pcluster);
64 64
65 return !mcpm_cpu_power_down_finish(pcpu, pcluster); 65 return !mcpm_wait_for_cpu_powerdown(pcpu, pcluster);
66} 66}
67 67
68static int mcpm_cpu_disable(unsigned int cpu) 68static int mcpm_cpu_disable(unsigned int cpu)
diff --git a/arch/arm/include/asm/mcpm.h b/arch/arm/include/asm/mcpm.h
index 608516ebabfe..90ed21942456 100644
--- a/arch/arm/include/asm/mcpm.h
+++ b/arch/arm/include/asm/mcpm.h
@@ -91,14 +91,14 @@ int mcpm_cpu_power_up(unsigned int cpu, unsigned int cluster);
91 * previously in which case the caller should take appropriate action. 91 * previously in which case the caller should take appropriate action.
92 * 92 *
93 * On success, the CPU is not guaranteed to be truly halted until 93 * On success, the CPU is not guaranteed to be truly halted until
94 * mcpm_cpu_power_down_finish() subsequently returns non-zero for the 94 * mcpm_wait_for_cpu_powerdown() subsequently returns non-zero for the
95 * specified cpu. Until then, other CPUs should make sure they do not 95 * specified cpu. Until then, other CPUs should make sure they do not
96 * trash memory the target CPU might be executing/accessing. 96 * trash memory the target CPU might be executing/accessing.
97 */ 97 */
98void mcpm_cpu_power_down(void); 98void mcpm_cpu_power_down(void);
99 99
100/** 100/**
101 * mcpm_cpu_power_down_finish - wait for a specified CPU to halt, and 101 * mcpm_wait_for_cpu_powerdown - wait for a specified CPU to halt, and
102 * make sure it is powered off 102 * make sure it is powered off
103 * 103 *
104 * @cpu: CPU number within given cluster 104 * @cpu: CPU number within given cluster
@@ -120,7 +120,7 @@ void mcpm_cpu_power_down(void);
120 * - zero if the CPU is in a safely parked state 120 * - zero if the CPU is in a safely parked state
121 * - nonzero otherwise (e.g., timeout) 121 * - nonzero otherwise (e.g., timeout)
122 */ 122 */
123int mcpm_cpu_power_down_finish(unsigned int cpu, unsigned int cluster); 123int mcpm_wait_for_cpu_powerdown(unsigned int cpu, unsigned int cluster);
124 124
125/** 125/**
126 * mcpm_cpu_suspend - bring the calling CPU in a suspended state 126 * mcpm_cpu_suspend - bring the calling CPU in a suspended state
@@ -164,7 +164,7 @@ int mcpm_cpu_powered_up(void);
164struct mcpm_platform_ops { 164struct mcpm_platform_ops {
165 int (*power_up)(unsigned int cpu, unsigned int cluster); 165 int (*power_up)(unsigned int cpu, unsigned int cluster);
166 void (*power_down)(void); 166 void (*power_down)(void);
167 int (*power_down_finish)(unsigned int cpu, unsigned int cluster); 167 int (*wait_for_powerdown)(unsigned int cpu, unsigned int cluster);
168 void (*suspend)(u64); 168 void (*suspend)(u64);
169 void (*powered_up)(void); 169 void (*powered_up)(void);
170}; 170};
diff --git a/arch/arm/mach-vexpress/tc2_pm.c b/arch/arm/mach-vexpress/tc2_pm.c
index 29e7785a54bc..b743a0ae02ce 100644
--- a/arch/arm/mach-vexpress/tc2_pm.c
+++ b/arch/arm/mach-vexpress/tc2_pm.c
@@ -209,7 +209,7 @@ static int tc2_core_in_reset(unsigned int cpu, unsigned int cluster)
209#define POLL_MSEC 10 209#define POLL_MSEC 10
210#define TIMEOUT_MSEC 1000 210#define TIMEOUT_MSEC 1000
211 211
212static int tc2_pm_power_down_finish(unsigned int cpu, unsigned int cluster) 212static int tc2_pm_wait_for_powerdown(unsigned int cpu, unsigned int cluster)
213{ 213{
214 unsigned tries; 214 unsigned tries;
215 215
@@ -290,7 +290,7 @@ static void tc2_pm_powered_up(void)
290static const struct mcpm_platform_ops tc2_pm_power_ops = { 290static const struct mcpm_platform_ops tc2_pm_power_ops = {
291 .power_up = tc2_pm_power_up, 291 .power_up = tc2_pm_power_up,
292 .power_down = tc2_pm_power_down, 292 .power_down = tc2_pm_power_down,
293 .power_down_finish = tc2_pm_power_down_finish, 293 .wait_for_powerdown = tc2_pm_wait_for_powerdown,
294 .suspend = tc2_pm_suspend, 294 .suspend = tc2_pm_suspend,
295 .powered_up = tc2_pm_powered_up, 295 .powered_up = tc2_pm_powered_up,
296}; 296};