blob: c7a41d03d23f04cec72b296a190690cef3d8e990 [file] [log] [blame]
Minkyu Kang87649982009-10-01 17:20:01 +09001/*
2 * Copyright (c) 2009 Samsung Electronics.
3 * Minkyu Kang <mk7.kang@samsung.com>
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 * MA 02111-1307 USA
22 */
23
24#include <asm/arch/cpu.h>
Aneesh Vfd8798b2012-03-08 07:20:18 +000025#include <linux/linkage.h>
Minkyu Kang87649982009-10-01 17:20:01 +090026
27#define S5PC100_SWRESET 0xE0200000
28#define S5PC110_SWRESET 0xE0102000
29
Aneesh Vfd8798b2012-03-08 07:20:18 +000030ENTRY(reset_cpu)
Minkyu Kangc8189842010-08-13 16:07:35 +090031 ldr r1, =S5PC100_PRO_ID
Minkyu Kang87649982009-10-01 17:20:01 +090032 ldr r2, [r1]
33 ldr r4, =0x00010000
34 and r4, r2, r4
35 cmp r4, #0
36 bne 110f
37 /* S5PC100 */
38 ldr r1, =S5PC100_SWRESET
39 ldr r2, =0xC100
40 b 200f
41110: /* S5PC110 */
42 ldr r1, =S5PC110_SWRESET
43 mov r2, #1
44200:
45 str r2, [r1]
46_loop_forever:
47 b _loop_forever
Aneesh Vfd8798b2012-03-08 07:20:18 +000048ENDPROC(reset_cpu)