blob: bd74f2b4512bde370b1afd3356173fd41830885d [file] [log] [blame]
Minkyu Kang399e5ae2009-10-01 17:20:01 +09001/*
2 * Copyright (c) 2009 Samsung Electronics.
3 * Minkyu Kang <mk7.kang@samsung.com>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Minkyu Kang399e5ae2009-10-01 17:20:01 +09006 */
7
8#include <asm/arch/cpu.h>
Aneesh V74236ac2012-03-08 07:20:18 +00009#include <linux/linkage.h>
Minkyu Kang399e5ae2009-10-01 17:20:01 +090010
11#define S5PC100_SWRESET 0xE0200000
12#define S5PC110_SWRESET 0xE0102000
13
Aneesh V74236ac2012-03-08 07:20:18 +000014ENTRY(reset_cpu)
Minkyu Kangd93d0f02010-08-13 16:07:35 +090015 ldr r1, =S5PC100_PRO_ID
Minkyu Kang399e5ae2009-10-01 17:20:01 +090016 ldr r2, [r1]
17 ldr r4, =0x00010000
18 and r4, r2, r4
19 cmp r4, #0
20 bne 110f
21 /* S5PC100 */
22 ldr r1, =S5PC100_SWRESET
23 ldr r2, =0xC100
24 b 200f
25110: /* S5PC110 */
26 ldr r1, =S5PC110_SWRESET
27 mov r2, #1
28200:
29 str r2, [r1]
30_loop_forever:
31 b _loop_forever
Aneesh V74236ac2012-03-08 07:20:18 +000032ENDPROC(reset_cpu)