Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa7eb2bb authored by Michal Simek's avatar Michal Simek
Browse files

arm: zynq: Add smp support



Zynq is dual core Cortex A9 which starts always
at zero. Using simple trampoline ensure long jump
to secondary_startup code.

Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarSteffen Trumtrar <s.trumtrar@pengutronix.de>
parent 2f34e0a5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ config ARCH_ZYNQ
	select ICST
	select MIGHT_HAVE_CACHE_L2X0
	select USE_OF
	select HAVE_SMP
	select SPARSE_IRQ
	select CADENCE_TTC_TIMER
	help
+1 −0
Original line number Diff line number Diff line
@@ -4,3 +4,4 @@

# Common support
obj-y				:= common.o slcr.o
obj-$(CONFIG_SMP)		+= headsmp.o platsmp.o
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ static const char * const zynq_dt_match[] = {
};

MACHINE_START(XILINX_EP107, "Xilinx Zynq Platform")
	.smp		= smp_ops(zynq_smp_ops),
	.map_io		= zynq_map_io,
	.init_irq	= irqchip_init,
	.init_machine	= zynq_init_machine,
+11 −0
Original line number Diff line number Diff line
@@ -19,6 +19,17 @@

extern int zynq_slcr_init(void);
extern void zynq_slcr_system_reset(void);
extern void zynq_slcr_cpu_stop(int cpu);
extern void zynq_slcr_cpu_start(int cpu);

#ifdef CONFIG_SMP
extern void secondary_startup(void);
extern char zynq_secondary_trampoline;
extern char zynq_secondary_trampoline_jump;
extern char zynq_secondary_trampoline_end;
extern int __cpuinit zynq_cpun_start(u32 address, int cpu);
extern struct smp_operations zynq_smp_ops __initdata;
#endif

extern void __iomem *zynq_slcr_base;
extern void __iomem *zynq_scu_base;
+24 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013 Steffen Trumtrar <s.trumtrar@pengutronix.de>
 * Copyright (c) 2012-2013 Xilinx
 *
 * 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>

	__CPUINIT

ENTRY(zynq_secondary_trampoline)
	ldr	r0, [pc]
	bx	r0
.globl zynq_secondary_trampoline_jump
zynq_secondary_trampoline_jump:
	/* Space for jumping address */
	.word	/* cpu 1 */
.globl zynq_secondary_trampoline_end
zynq_secondary_trampoline_end:

ENDPROC(zynq_secondary_trampoline)
Loading