@@ -1,5 +1,5 @@
/*
- * linux/arch/arm/plat-socfpga5xs1/headsmp.S
+ * Trampoline to bring CPU from reset.
*
* Copyright (c) 2012 Pavel Machek <pavel@denx.de>
* Copyright (c) u-boot contributors
@@ -15,9 +15,9 @@
__INIT
-#define HPS_SYSMGR_ADDRESS 0xffd08000
-#define CONFIG_SYSTEM_MANAGER HPS_SYSMGR_ADDRESS
-#define CONFIG_CPU1_START_ADDR (CONFIG_SYSTEM_MANAGER + 0x10)
+#define HPS_SYSMGR_ADDRESS 0xffd08000
+#define CONFIG_SYSTEM_MANAGER HPS_SYSMGR_ADDRESS
+#define CONFIG_CPU1_START_ADDR (CONFIG_SYSTEM_MANAGER + 0x10)
ENTRY(secondary_trampoline)
movw r0, #:lower16:CONFIG_CPU1_START_ADDR
@@ -25,9 +25,4 @@ ENTRY(secondary_trampoline)
ldr r1, [r0]
bx r1
-
ENTRY(secondary_trampoline_end)
-
- .align
- .long pen_release
-
@@ -1,4 +1,7 @@
-/* Copyright 2010-2011 Calxeda, Inc.
+/*
+ * SMP support.
+ *
+ * Copyright 2010-2011 Calxeda, Inc.
* Copyright 2012 Pavel Machek <pavel@denx.de>
* Based on platsmp.c, Copyright (C) 2002 ARM Ltd.
*
@@ -31,8 +34,6 @@
static void __iomem *sys_manager_base_addr;
static void __iomem *rst_manager_base_addr;
-static DEFINE_SPINLOCK(boot_lock);
-
static void __cpuinit socfpga_secondary_init(unsigned int cpu)
{
/*
@@ -41,41 +42,20 @@ static void __cpuinit socfpga_secondary_init(unsigned int cpu)
* for us: do so
*/
gic_secondary_init(0);
-
- /*
- * let the primary processor know we're out of the
- * pen, then head off into the C entry point
- */
- pen_release = -1;
- smp_wmb();
-
- /*
- * Synchronise with the boot thread.
- */
- spin_lock(&boot_lock);
- spin_unlock(&boot_lock);
-
- early_printk("Secondary ready.\n");
+ early_printk("Started secondary.\n");
}
static int __cpuinit socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
- unsigned long timeout;
extern char secondary_trampoline, secondary_trampoline_end;
int trampoline_size = &secondary_trampoline_end - &secondary_trampoline;
early_printk("Boot secondary...\n");
- /*
- * Set synchronisation state between this boot processor
- * and the secondary one
- */
- spin_lock(&boot_lock);
memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size);
__raw_writel(virt_to_phys(secondary_startup), (sys_manager_base_addr+0x10));
- pen_release = 0;
flush_cache_all();
smp_wmb();
outer_clean_range(0, trampoline_size);
@@ -83,21 +63,7 @@ static int __cpuinit socfpga_boot_secondary(unsigned int cpu, struct task_struct
in u-boot */
__raw_writel(0, rst_manager_base_addr + 0x10);
- timeout = jiffies + (1 * HZ);
- while (time_before(jiffies, timeout)) {
- smp_rmb();
- if (pen_release == -1)
- break;
-
- udelay(10);
- }
-
- /*
- * now the secondary core is starting up let it run its
- * calibrations, then wait for it to finish
- */
- spin_unlock(&boot_lock);
- return pen_release != -1 ? -ENOSYS : 0;
+ return 0;
}
/*