blob: 626f1b642745ae4f15f18ee66b362c656a47ddfb [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Tom Warren41b68382011-01-27 10:58:05 +00002/*
3 * SoC-specific setup info
4 *
5 * (C) Copyright 2010,2011
6 * NVIDIA Corporation <www.nvidia.com>
Tom Warren41b68382011-01-27 10:58:05 +00007 */
8
9#include <config.h>
Aneesh Vfd8798b2012-03-08 07:20:18 +000010#include <linux/linkage.h>
Tom Warren41b68382011-01-27 10:58:05 +000011
Tom Warrenab0cc6b2015-03-04 16:36:00 -070012#ifdef CONFIG_ARM64
Tom Warren41b68382011-01-27 10:58:05 +000013 .align 5
Aneesh Vfd8798b2012-03-08 07:20:18 +000014ENTRY(reset_cpu)
Tom Warrenab0cc6b2015-03-04 16:36:00 -070015 /* get address for global reset register */
16 ldr x1, =PRM_RSTCTRL
17 ldr w3, [x1]
18 /* force reset */
19 orr w3, w3, #0x10
20 str w3, [x1]
21 mov w0, w0
221:
23 b 1b
24ENDPROC(reset_cpu)
25#else
26 .align 5
27ENTRY(reset_cpu)
Tom Warren41b68382011-01-27 10:58:05 +000028 ldr r1, rstctl @ get addr for global reset
29 @ reg
30 ldr r3, [r1]
31 orr r3, r3, #0x10
32 str r3, [r1] @ force reset
33 mov r0, r0
34_loop_forever:
35 b _loop_forever
36rstctl:
37 .word PRM_RSTCTRL
Aneesh Vfd8798b2012-03-08 07:20:18 +000038ENDPROC(reset_cpu)
Tom Warrenab0cc6b2015-03-04 16:36:00 -070039#endif