Skip to contentSkip to conversation

U8500: adds secondary cpu support, local timers

PATCH New srinidhi kasagar 1 participant 1 message Sep 23, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/8 U8500: adds secondary cpu support, local timers

From: srinidhi kasagar <[email protected]>

This adds entry point for the secondary CPU and setup the infrastructure for the secondary CPU. This also enables the local timer for U8500, whereas this doesn't participate in the system tick.

---
 arch/arm/mach-ux500/headsmp.S    |   38 ++++++++
 arch/arm/mach-ux500/localtimer.c |   28 ++++++
 arch/arm/mach-ux500/platsmp.c    |  181 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 247 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-ux500/headsmp.S
 create mode 100644 arch/arm/mach-ux500/localtimer.c
 create mode 100644 arch/arm/mach-ux500/platsmp.c
arch/arm/mach-ux500/headsmp.S new file +38 -0
new file mode 100644
index 0000000..a6be2cd
@@ -0,0 +1,38 @@
+/*
+ *  Copyright (c) 2009 ST-Ericsson
+ *	This file is based  ARM Realview platform
+ *  Copyright (c) 2003 ARM Limited
+ *  All Rights Reserved
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <linux/init.h>
+
+	__INIT
+
+/*
+ * U8500 specific entry point for secondary CPUs.
+ */
+ENTRY(u8500_secondary_startup)
+	mrc	p15, 0, r0, c0, c0, 5
+	and	r0, r0, #15
+	adr	r4, 1f
+	ldmia	r4, {r5, r6}
+	sub	r4, r4, r5
+	add	r6, r6, r4
+	dsb
+pen:	ldr	r7, [r6]
+	cmp	r7, r0
+	bne	pen
+
+	/*
+	 * we've been released from the holding pen: secondary_stack
+	 * should now contain the SVC stack for this core
+	 */
+	b	secondary_startup
+
+1:	.long	.
+	.long	pen_release
arch/arm/mach-ux500/localtimer.c new file +28 -0
new file mode 100644
index 0000000..2288f6a
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2008-2009 ST-Ericsson
+ * Srinidhi Kasagar <[email protected]>
+ *
+ * This file is heavily based on relaview platform, almost a copy.
+ *
+ * Copyright (C) 2002 ARM Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/init.h>
+#include <linux/smp.h>
+#include <linux/clockchips.h>
+
+#include <asm/irq.h>
+#include <asm/smp_twd.h>
+#include <asm/localtimer.h>
+
+/*
+ * Setup the local clock events for a CPU.
+ */
+void __cpuinit local_timer_setup(struct clock_event_device *evt)
+{
+	evt->irq = IRQ_LOCALTIMER;
+	twd_timer_setup(evt);
+}
arch/arm/mach-ux500/platsmp.c new file +181 -0

181 lines not on this page · raw message

Signature · 1 line
1.6.3.GIT