mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-10-31 03:58:17 +00:00 
			
		
		
		
	The sysreset uclass unconditionally provides a definition of the
reset_cpu() function. So does the exynos soc code. Fix the build with
SYSRESET enabled by omitting the function from the soc code in that
case. The code still needs to be kept around for use in SPL.
This commit was inspired by commit 6e19dc84c14b ("sunxi: Avoid duplicate
reset_cpu with SYSRESET enabled").
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
		
	
			
		
			
				
	
	
		
			40 lines
		
	
	
		
			912 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			912 B
		
	
	
	
		
			C
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0+
 | |
| /*
 | |
|  * Copyright (c) 2010 Samsung Electronics.
 | |
|  * Minkyu Kang <mk7.kang@samsung.com>
 | |
|  */
 | |
| 
 | |
| #include <common.h>
 | |
| #include <cpu_func.h>
 | |
| #include <asm/cache.h>
 | |
| #include <asm/io.h>
 | |
| #include <asm/system.h>
 | |
| #include <asm/arch/cpu.h>
 | |
| 
 | |
| #ifdef CONFIG_TARGET_ESPRESSO7420
 | |
| /*
 | |
|  * Exynos7420 uses CPU0 of Cluster-1 as boot CPU. Due to this, branch_if_master
 | |
|  * fails to identify as the boot CPU as the master CPU. As temporary workaround,
 | |
|  * setup the slave CPU boot address as "_main".
 | |
|  */
 | |
| extern void _main(void);
 | |
| void *secondary_boot_addr = (void *)_main;
 | |
| #endif /* CONFIG_TARGET_ESPRESSO7420 */
 | |
| 
 | |
| #if !CONFIG_IS_ENABLED(SYSRESET)
 | |
| void reset_cpu(void)
 | |
| {
 | |
| #ifdef CONFIG_CPU_V7A
 | |
| 	writel(0x1, samsung_get_base_swreset());
 | |
| #endif
 | |
| }
 | |
| #endif
 | |
| 
 | |
| #if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
 | |
| void enable_caches(void)
 | |
| {
 | |
| 	/* Enable D-cache. I-cache is already enabled in start.S */
 | |
| 	dcache_enable();
 | |
| }
 | |
| #endif
 |