xref: /openbmc/linux/arch/arm/mach-imx/headsmp.S (revision c4f7ac64)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Copyright 2011 Freescale Semiconductor, Inc.
4 * Copyright 2011 Linaro Ltd.
5 */
6
7#include <linux/linkage.h>
8#include <linux/init.h>
9#include <asm/assembler.h>
10
11diag_reg_offset:
12	.word	g_diag_reg - .
13
14	.macro	set_diag_reg
15	adr	r0, diag_reg_offset
16	ldr	r1, [r0]
17	add	r1, r1, r0		@ r1 = physical &g_diag_reg
18	ldr	r0, [r1]
19	mcr	p15, 0, r0, c15, c0, 1	@ write diagnostic register
20	.endm
21
22ENTRY(v7_secondary_startup)
23ARM_BE8(setend be)			@ go BE8 if entered LE
24	set_diag_reg
25	b	secondary_startup
26ENDPROC(v7_secondary_startup)
27