summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mvebu/pmsu.c
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@free-electrons.com>2014-07-23 15:00:44 +0200
committerJason Cooper <jason@lakedaemon.net>2014-07-24 11:46:19 +0000
commit752a99377673cd251517623df138ca3c5b8fe772 (patch)
tree058762ccdca81e33e155a9b97d4729e9b23a37b1 /arch/arm/mach-mvebu/pmsu.c
parent54a4d1b8d4ca808f46fc3ad3fd9b2c6fd79286a9 (diff)
downloadlinux-stable-752a99377673cd251517623df138ca3c5b8fe772.tar.gz
linux-stable-752a99377673cd251517623df138ca3c5b8fe772.tar.bz2
linux-stable-752a99377673cd251517623df138ca3c5b8fe772.zip
ARM: mvebu: use a local variable to store the resume address
The resume address used by the cpuidle code will not always be the same depending on the SoC. Using a local variable to store the resume address allows to keep the same function for the PM notifier but with a different address. This address will be set during the initialization of the cpuidle logic in pmsu.c. Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Link: https://lkml.kernel.org/r/1406120453-29291-8-git-send-email-thomas.petazzoni@free-electrons.com Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-mvebu/pmsu.c')
-rw-r--r--arch/arm/mach-mvebu/pmsu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c
index e976c3e5e1fe..ab525b7bfc03 100644
--- a/arch/arm/mach-mvebu/pmsu.c
+++ b/arch/arm/mach-mvebu/pmsu.c
@@ -73,6 +73,8 @@ extern void ll_enable_coherency(void);
extern void armada_370_xp_cpu_resume(void);
+static void *mvebu_cpu_resume;
+
static struct platform_device mvebu_v7_cpuidle_device = {
.name = "cpuidle-armada-370-xp",
};
@@ -299,7 +301,7 @@ static int mvebu_v7_cpu_pm_notify(struct notifier_block *self,
{
if (action == CPU_PM_ENTER) {
unsigned int hw_cpu = cpu_logical_map(smp_processor_id());
- mvebu_pmsu_set_cpu_boot_addr(hw_cpu, armada_370_xp_cpu_resume);
+ mvebu_pmsu_set_cpu_boot_addr(hw_cpu, mvebu_cpu_resume);
} else if (action == CPU_PM_EXIT) {
mvebu_v7_pmsu_idle_exit();
}
@@ -320,6 +322,7 @@ static int __init armada_xp_cpuidle_init(void)
return -ENODEV;
of_node_put(np);
+ mvebu_cpu_resume = armada_370_xp_cpu_resume;
mvebu_v7_cpuidle_device.dev.platform_data = armada_370_xp_cpu_suspend;
return 0;