diff options
author | Gregory CLEMENT <gregory.clement@free-electrons.com> | 2014-04-14 09:50:33 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2014-04-24 01:24:30 -0400 |
commit | 02e7b06795fc129e45ed39983673efbb05d69506 (patch) | |
tree | 52eb1cc7923c3bcb31b6efcc73a76069c392a0d8 /arch/arm/mach-mvebu | |
parent | 0c3acc746d2cd84c3654b6cc07eda2411584f4af (diff) |
ARM: mvebu: use a separate function to set the boot address of CPUs
Setting the start (or boot) address of a CPU is no more used only
during SMP bring up on Armada 370/XP, but it will also be used by the
CPU idle function of Armada XP, and by the Armada 38x SMP support.
Therefore this commit creates a separate PMSU function to set the boot
address of a CPU with the PMSU.
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Link: https://lkml.kernel.org/r/1397483433-25836-7-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1397483433-25836-7-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/mach-mvebu')
-rw-r--r-- | arch/arm/mach-mvebu/pmsu.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index 4ae3ea1af7c3..8361281f9180 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c | |||
@@ -41,6 +41,12 @@ static struct of_device_id of_pmsu_table[] = { | |||
41 | { /* end of list */ }, | 41 | { /* end of list */ }, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr) | ||
45 | { | ||
46 | writel(virt_to_phys(boot_addr), pmsu_mp_base + | ||
47 | PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); | ||
48 | } | ||
49 | |||
44 | #ifdef CONFIG_SMP | 50 | #ifdef CONFIG_SMP |
45 | int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr) | 51 | int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr) |
46 | { | 52 | { |
@@ -53,8 +59,7 @@ int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr) | |||
53 | 59 | ||
54 | hw_cpu = cpu_logical_map(cpu_id); | 60 | hw_cpu = cpu_logical_map(cpu_id); |
55 | 61 | ||
56 | writel(virt_to_phys(boot_addr), pmsu_mp_base + | 62 | mvebu_pmsu_set_cpu_boot_addr(hw_cpu, boot_addr); |
57 | PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); | ||
58 | 63 | ||
59 | ret = mvebu_cpu_reset_deassert(hw_cpu); | 64 | ret = mvebu_cpu_reset_deassert(hw_cpu); |
60 | if (ret) { | 65 | if (ret) { |