Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2009 Samsung Electronics. |
| 4 | * Minkyu Kang <mk7.kang@samsung.com> |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <asm/arch/cpu.h> |
Aneesh V | fd8798b | 2012-03-08 07:20:18 +0000 | [diff] [blame] | 8 | #include <linux/linkage.h> |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 9 | |
| 10 | #define S5PC100_SWRESET 0xE0200000 |
| 11 | #define S5PC110_SWRESET 0xE0102000 |
| 12 | |
Aneesh V | fd8798b | 2012-03-08 07:20:18 +0000 | [diff] [blame] | 13 | ENTRY(reset_cpu) |
Minkyu Kang | c818984 | 2010-08-13 16:07:35 +0900 | [diff] [blame] | 14 | ldr r1, =S5PC100_PRO_ID |
Minkyu Kang | 8764998 | 2009-10-01 17:20:01 +0900 | [diff] [blame] | 15 | 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 |
| 24 | 110: /* S5PC110 */ |
| 25 | ldr r1, =S5PC110_SWRESET |
| 26 | mov r2, #1 |
| 27 | 200: |
| 28 | str r2, [r1] |
| 29 | _loop_forever: |
| 30 | b _loop_forever |
Aneesh V | fd8798b | 2012-03-08 07:20:18 +0000 | [diff] [blame] | 31 | ENDPROC(reset_cpu) |