Minkyu Kang | 008a351 | 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 | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
Minkyu Kang | 008a351 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <asm/io.h> |
Rajeshwari Shinde | 7ee68fe | 2012-11-29 20:29:35 +0000 | [diff] [blame] | 10 | #include <asm/system.h> |
| 11 | |
Thomas Abraham | 95e74a3 | 2016-11-16 18:49:16 +0530 | [diff] [blame] | 12 | #ifdef CONFIG_TARGET_ESPRESSO7420 |
| 13 | /* |
| 14 | * Exynos7420 uses CPU0 of Cluster-1 as boot CPU. Due to this, branch_if_master |
| 15 | * fails to identify as the boot CPU as the master CPU. As temporary workaround, |
| 16 | * setup the slave CPU boot address as "_main". |
| 17 | */ |
| 18 | extern void _main(void); |
| 19 | void *secondary_boot_addr = (void *)_main; |
| 20 | #endif /* CONFIG_TARGET_ESPRESSO7420 */ |
| 21 | |
Minkyu Kang | 008a351 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 22 | void reset_cpu(ulong addr) |
| 23 | { |
Thomas Abraham | 36aa893 | 2016-04-23 22:18:12 +0530 | [diff] [blame] | 24 | #ifdef CONFIG_CPU_V7 |
Minkyu Kang | 008a351 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 25 | writel(0x1, samsung_get_base_swreset()); |
Thomas Abraham | 36aa893 | 2016-04-23 22:18:12 +0530 | [diff] [blame] | 26 | #endif |
Minkyu Kang | 008a351 | 2011-01-24 15:22:23 +0900 | [diff] [blame] | 27 | } |
Ćukasz Majewski | d7957d1 | 2012-08-07 03:24:03 +0000 | [diff] [blame] | 28 | |
| 29 | #ifndef CONFIG_SYS_DCACHE_OFF |
| 30 | void enable_caches(void) |
| 31 | { |
| 32 | /* Enable D-cache. I-cache is already enabled in start.S */ |
| 33 | dcache_enable(); |
| 34 | } |
| 35 | #endif |