summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mvebu/pmsu.c
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-14 15:53:58 +0200
committerJason Cooper <jason@lakedaemon.net>2014-05-08 16:07:37 +0000
commit05ad690608098b469d6052c700d96c35e697a955 (patch)
treebf9cccb0090608a1f75cff887183983c65cb5735 /arch/arm/mach-mvebu/pmsu.c
parentd269a36ae7002d96a5691cdef96b5bb6f41330f6 (diff)
ARM: mvebu: move Armada XP specific SMP initialization to platsmp.c
The pmsu.c driver contained an armada_xp_boot_cpu() function that sets the boot address of a secondary CPUs and deasserts the reset. However, the Armada 375 needs a slightly different logic, so it makes more sense to move this code into the Armada XP specific platsmp.c. In order to achieve this, the mvebu_pmsu_set_cpu_boot_addr() function is exported. It will be needed for both the Armada XP and Armada 38x SMP implementations. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Link: https://lkml.kernel.org/r/1397483648-26611-2-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.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c
index 8361281f9180..a1508deecd26 100644
--- a/arch/arm/mach-mvebu/pmsu.c
+++ b/arch/arm/mach-mvebu/pmsu.c
@@ -41,36 +41,12 @@ static struct of_device_id of_pmsu_table[] = {
{ /* end of list */ },
};
-static void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
+void mvebu_pmsu_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
{
writel(virt_to_phys(boot_addr), pmsu_mp_base +
PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu));
}
-#ifdef CONFIG_SMP
-int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr)
-{
- int hw_cpu, ret;
-
- if (!pmsu_mp_base) {
- pr_warn("Can't boot CPU. PMSU is uninitialized\n");
- return -ENODEV;
- }
-
- hw_cpu = cpu_logical_map(cpu_id);
-
- mvebu_pmsu_set_cpu_boot_addr(hw_cpu, boot_addr);
-
- ret = mvebu_cpu_reset_deassert(hw_cpu);
- if (ret) {
- pr_warn("unable to boot CPU: %d\n", ret);
- return ret;
- }
-
- return 0;
-}
-#endif
-
static int __init armada_370_xp_pmsu_init(void)
{
struct device_node *np;