xref: /openbmc/u-boot/arch/arm/mach-s5pc1xx/reset.S (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini/* SPDX-License-Identifier: GPL-2.0+ */
2225f5eecSMinkyu Kang/*
3225f5eecSMinkyu Kang * Copyright (c) 2009 Samsung Electronics.
4225f5eecSMinkyu Kang * Minkyu Kang <mk7.kang@samsung.com>
5225f5eecSMinkyu Kang */
6225f5eecSMinkyu Kang
7225f5eecSMinkyu Kang#include <asm/arch/cpu.h>
8225f5eecSMinkyu Kang#include <linux/linkage.h>
9225f5eecSMinkyu Kang
10225f5eecSMinkyu Kang#define S5PC100_SWRESET			0xE0200000
11225f5eecSMinkyu Kang#define S5PC110_SWRESET			0xE0102000
12225f5eecSMinkyu Kang
13225f5eecSMinkyu KangENTRY(reset_cpu)
14225f5eecSMinkyu Kang	ldr	r1, =S5PC100_PRO_ID
15225f5eecSMinkyu Kang	ldr	r2, [r1]
16225f5eecSMinkyu Kang	ldr	r4, =0x00010000
17225f5eecSMinkyu Kang	and	r4, r2, r4
18225f5eecSMinkyu Kang	cmp	r4, #0
19225f5eecSMinkyu Kang	bne	110f
20225f5eecSMinkyu Kang	/* S5PC100 */
21225f5eecSMinkyu Kang	ldr	r1, =S5PC100_SWRESET
22225f5eecSMinkyu Kang	ldr	r2, =0xC100
23225f5eecSMinkyu Kang	b	200f
24225f5eecSMinkyu Kang110:	/* S5PC110 */
25225f5eecSMinkyu Kang	ldr	r1, =S5PC110_SWRESET
26225f5eecSMinkyu Kang	mov	r2, #1
27225f5eecSMinkyu Kang200:
28225f5eecSMinkyu Kang	str	r2, [r1]
29225f5eecSMinkyu Kang_loop_forever:
30225f5eecSMinkyu Kang	b	_loop_forever
31225f5eecSMinkyu KangENDPROC(reset_cpu)
32