xref: /OK3568_Linux_fs/u-boot/arch/arm/mach-exynos/soc.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (c) 2010 Samsung Electronics.
3*4882a593Smuzhiyun  * Minkyu Kang <mk7.kang@samsung.com>
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * SPDX-License-Identifier:	GPL-2.0+
6*4882a593Smuzhiyun  */
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun #include <common.h>
9*4882a593Smuzhiyun #include <asm/io.h>
10*4882a593Smuzhiyun #include <asm/system.h>
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #ifdef CONFIG_TARGET_ESPRESSO7420
13*4882a593Smuzhiyun /*
14*4882a593Smuzhiyun  * Exynos7420 uses CPU0 of Cluster-1 as boot CPU. Due to this, branch_if_master
15*4882a593Smuzhiyun  * fails to identify as the boot CPU as the master CPU. As temporary workaround,
16*4882a593Smuzhiyun  * setup the slave CPU boot address as "_main".
17*4882a593Smuzhiyun  */
18*4882a593Smuzhiyun extern void _main(void);
19*4882a593Smuzhiyun void *secondary_boot_addr = (void *)_main;
20*4882a593Smuzhiyun #endif /* CONFIG_TARGET_ESPRESSO7420 */
21*4882a593Smuzhiyun 
reset_cpu(ulong addr)22*4882a593Smuzhiyun void reset_cpu(ulong addr)
23*4882a593Smuzhiyun {
24*4882a593Smuzhiyun #ifdef CONFIG_CPU_V7
25*4882a593Smuzhiyun 	writel(0x1, samsung_get_base_swreset());
26*4882a593Smuzhiyun #endif
27*4882a593Smuzhiyun }
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun #ifndef CONFIG_SYS_DCACHE_OFF
enable_caches(void)30*4882a593Smuzhiyun void enable_caches(void)
31*4882a593Smuzhiyun {
32*4882a593Smuzhiyun 	/* Enable D-cache. I-cache is already enabled in start.S */
33*4882a593Smuzhiyun 	dcache_enable();
34*4882a593Smuzhiyun }
35*4882a593Smuzhiyun #endif
36