xref: /openbmc/linux/arch/arm/mach-mvebu/headsmp.S (revision 2e8a5942)
145f5984aSGregory CLEMENT/*
245f5984aSGregory CLEMENT * SMP support: Entry point for secondary CPUs
345f5984aSGregory CLEMENT *
445f5984aSGregory CLEMENT * Copyright (C) 2012 Marvell
545f5984aSGregory CLEMENT *
645f5984aSGregory CLEMENT * Yehuda Yitschak <yehuday@marvell.com>
745f5984aSGregory CLEMENT * Gregory CLEMENT <gregory.clement@free-electrons.com>
845f5984aSGregory CLEMENT * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
945f5984aSGregory CLEMENT *
1045f5984aSGregory CLEMENT * This file is licensed under the terms of the GNU General Public
1145f5984aSGregory CLEMENT * License version 2.  This program is licensed "as is" without any
1245f5984aSGregory CLEMENT * warranty of any kind, whether express or implied.
1345f5984aSGregory CLEMENT *
1445f5984aSGregory CLEMENT * This file implements the assembly entry point for secondary CPUs in
1545f5984aSGregory CLEMENT * an SMP kernel. The only thing we need to do is to add the CPU to
1645f5984aSGregory CLEMENT * the coherency fabric by writing to 2 registers. Currently the base
1745f5984aSGregory CLEMENT * register addresses are hard coded due to the early initialisation
1845f5984aSGregory CLEMENT * problems.
1945f5984aSGregory CLEMENT */
2045f5984aSGregory CLEMENT
2145f5984aSGregory CLEMENT#include <linux/linkage.h>
2245f5984aSGregory CLEMENT#include <linux/init.h>
2345f5984aSGregory CLEMENT
24bca028e7SBen Dooks#include <asm/assembler.h>
25bca028e7SBen Dooks
2645f5984aSGregory CLEMENT/*
2745f5984aSGregory CLEMENT * Armada XP specific entry point for secondary CPUs.
2845f5984aSGregory CLEMENT * We add the CPU to the coherency fabric and then jump to secondary
2945f5984aSGregory CLEMENT * startup
3045f5984aSGregory CLEMENT */
3145f5984aSGregory CLEMENTENTRY(armada_xp_secondary_startup)
32bca028e7SBen Dooks ARM_BE8(setend	be )			@ go BE8 if entered LE
33bca028e7SBen Dooks
342e8a5942SGregory CLEMENT	bl	ll_add_cpu_to_smp_group
352e8a5942SGregory CLEMENT
362e8a5942SGregory CLEMENT	bl	ll_enable_coherency
372e8a5942SGregory CLEMENT
3845f5984aSGregory CLEMENT	b	secondary_startup
3945f5984aSGregory CLEMENT
4045f5984aSGregory CLEMENTENDPROC(armada_xp_secondary_startup)
41