blob: aac1ea061e0d4d4320f29e9229a1bbffb71026c5 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Minkyu Kang399e5ae2009-10-01 17:20:01 +09002/*
3 * Copyright (c) 2009 Samsung Electronics.
4 * Minkyu Kang <mk7.kang@samsung.com>
Minkyu Kang399e5ae2009-10-01 17:20:01 +09005 */
6
7#include <asm/arch/cpu.h>
Aneesh V74236ac2012-03-08 07:20:18 +00008#include <linux/linkage.h>
Minkyu Kang399e5ae2009-10-01 17:20:01 +09009
10#define S5PC100_SWRESET 0xE0200000
11#define S5PC110_SWRESET 0xE0102000
12
Aneesh V74236ac2012-03-08 07:20:18 +000013ENTRY(reset_cpu)
Minkyu Kangd93d0f02010-08-13 16:07:35 +090014 ldr r1, =S5PC100_PRO_ID
Minkyu Kang399e5ae2009-10-01 17:20:01 +090015 ldr r2, [r1]
16 ldr r4, =0x00010000
17 and r4, r2, r4
18 cmp r4, #0
19 bne 110f
20 /* S5PC100 */
21 ldr r1, =S5PC100_SWRESET
22 ldr r2, =0xC100
23 b 200f
24110: /* S5PC110 */
25 ldr r1, =S5PC110_SWRESET
26 mov r2, #1
27200:
28 str r2, [r1]
29_loop_forever:
30 b _loop_forever
Aneesh V74236ac2012-03-08 07:20:18 +000031ENDPROC(reset_cpu)