blob: 1273f94aa38eac441b533933a358e51557e2ed29 [file] [log] [blame]
Tom Warren41b68382011-01-27 10:58:05 +00001/*
2 * SoC-specific setup info
3 *
4 * (C) Copyright 2010,2011
5 * NVIDIA Corporation <www.nvidia.com>
6 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02007 * SPDX-License-Identifier: GPL-2.0+
Tom Warren41b68382011-01-27 10:58:05 +00008 */
9
10#include <config.h>
Aneesh Vfd8798b2012-03-08 07:20:18 +000011#include <linux/linkage.h>
Tom Warren41b68382011-01-27 10:58:05 +000012
Tom Warrenab0cc6b2015-03-04 16:36:00 -070013#ifdef CONFIG_ARM64
Tom Warren41b68382011-01-27 10:58:05 +000014 .align 5
Aneesh Vfd8798b2012-03-08 07:20:18 +000015ENTRY(reset_cpu)
Tom Warrenab0cc6b2015-03-04 16:36:00 -070016 /* get address for global reset register */
17 ldr x1, =PRM_RSTCTRL
18 ldr w3, [x1]
19 /* force reset */
20 orr w3, w3, #0x10
21 str w3, [x1]
22 mov w0, w0
231:
24 b 1b
25ENDPROC(reset_cpu)
26#else
27 .align 5
28ENTRY(reset_cpu)
Tom Warren41b68382011-01-27 10:58:05 +000029 ldr r1, rstctl @ get addr for global reset
30 @ reg
31 ldr r3, [r1]
32 orr r3, r3, #0x10
33 str r3, [r1] @ force reset
34 mov r0, r0
35_loop_forever:
36 b _loop_forever
37rstctl:
38 .word PRM_RSTCTRL
Aneesh Vfd8798b2012-03-08 07:20:18 +000039ENDPROC(reset_cpu)
Tom Warrenab0cc6b2015-03-04 16:36:00 -070040#endif