Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2010 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 | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <asm/io.h> |
Rajeshwari Shinde | 10cb7fa | 2012-11-29 20:29:35 +0000 | [diff] [blame] | 10 | #include <asm/system.h> |
| 11 | |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 12 | void reset_cpu(ulong addr) |
| 13 | { |
Thomas Abraham | a99ad39 | 2016-04-23 22:18:12 +0530 | [diff] [blame] | 14 | #ifdef CONFIG_CPU_V7 |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 15 | writel(0x1, samsung_get_base_swreset()); |
Thomas Abraham | a99ad39 | 2016-04-23 22:18:12 +0530 | [diff] [blame] | 16 | #endif |
Minkyu Kang | b1b2468 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 17 | } |
Ćukasz Majewski | e667e76 | 2012-08-07 03:24:03 +0000 | [diff] [blame] | 18 | |
| 19 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 20 | void enable_caches(void) |
| 21 | { |
| 22 | /* Enable D-cache. I-cache is already enabled in start.S */ |
| 23 | dcache_enable(); |
| 24 | } |
| 25 | #endif |
Thomas Abraham | d23cb31 | 2016-04-23 22:18:13 +0530 | [diff] [blame] | 26 | |
| 27 | #ifdef CONFIG_ARM64 |
| 28 | void lowlevel_init(void) |
| 29 | { |
| 30 | armv8_switch_to_el2(); |
| 31 | armv8_switch_to_el1(); |
| 32 | } |
| 33 | #endif |