blob: 626f1b642745ae4f15f18ee66b362c656a47ddfb [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Tom Warren3f82b1d2011-01-27 10:58:05 +00002/*
3 * SoC-specific setup info
4 *
5 * (C) Copyright 2010,2011
6 * NVIDIA Corporation <www.nvidia.com>
Tom Warren3f82b1d2011-01-27 10:58:05 +00007 */
8
9#include <config.h>
Aneesh V74236ac2012-03-08 07:20:18 +000010#include <linux/linkage.h>
Tom Warren3f82b1d2011-01-27 10:58:05 +000011
Tom Warren7aaa5a62015-03-04 16:36:00 -070012#ifdef CONFIG_ARM64
13 .align 5
14ENTRY(reset_cpu)
15 /* 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
Tom Warren3f82b1d2011-01-27 10:58:05 +000026 .align 5
Aneesh V74236ac2012-03-08 07:20:18 +000027ENTRY(reset_cpu)
Tom Warren3f82b1d2011-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 V74236ac2012-03-08 07:20:18 +000038ENDPROC(reset_cpu)
Tom Warren7aaa5a62015-03-04 16:36:00 -070039#endif