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