Shawn Guo | 69c31b7 | 2011-09-06 14:59:40 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2011 Freescale Semiconductor, Inc. |
| 3 | * Copyright 2011 Linaro Ltd. |
| 4 | * |
| 5 | * The code contained herein is licensed under the GNU General Public |
| 6 | * License. You may obtain a copy of the GNU General Public License |
| 7 | * Version 2 or later at the following locations: |
| 8 | * |
| 9 | * http://www.opensource.org/licenses/gpl-license.html |
| 10 | * http://www.gnu.org/copyleft/gpl.html |
| 11 | */ |
| 12 | |
| 13 | #include <linux/linkage.h> |
| 14 | #include <linux/init.h> |
Johannes Berg | 26e30c6 | 2016-01-27 17:59:36 +0100 | [diff] [blame] | 15 | #include <asm/assembler.h> |
Shawn Guo | 69c31b7 | 2011-09-06 14:59:40 +0800 | [diff] [blame] | 16 | |
Shawn Guo | 087bb28 | 2013-04-16 22:11:19 +0800 | [diff] [blame] | 17 | diag_reg_offset: |
| 18 | .word g_diag_reg - . |
| 19 | |
| 20 | .macro set_diag_reg |
| 21 | adr r0, diag_reg_offset |
| 22 | ldr r1, [r0] |
| 23 | add r1, r1, r0 @ r1 = physical &g_diag_reg |
| 24 | ldr r0, [r1] |
| 25 | mcr p15, 0, r0, c15, c0, 1 @ write diagnostic register |
| 26 | .endm |
| 27 | |
Shawn Guo | 69c31b7 | 2011-09-06 14:59:40 +0800 | [diff] [blame] | 28 | ENTRY(v7_secondary_startup) |
Johannes Berg | 26e30c6 | 2016-01-27 17:59:36 +0100 | [diff] [blame] | 29 | ARM_BE8(setend be) @ go BE8 if entered LE |
Shawn Guo | 087bb28 | 2013-04-16 22:11:19 +0800 | [diff] [blame] | 30 | set_diag_reg |
Shawn Guo | 69c31b7 | 2011-09-06 14:59:40 +0800 | [diff] [blame] | 31 | b secondary_startup |
| 32 | ENDPROC(v7_secondary_startup) |