2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2011-01-24 06:22:23 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2010 Samsung Electronics.
|
|
|
|
* Minkyu Kang <mk7.kang@samsung.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2019-11-14 19:57:37 +00:00
|
|
|
#include <cpu_func.h>
|
2020-05-10 17:39:56 +00:00
|
|
|
#include <asm/cache.h>
|
2011-01-24 06:22:23 +00:00
|
|
|
#include <asm/io.h>
|
2012-11-29 20:29:35 +00:00
|
|
|
#include <asm/system.h>
|
|
|
|
|
2016-11-16 13:19:16 +00:00
|
|
|
#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 */
|
|
|
|
|
2020-12-15 15:47:52 +00:00
|
|
|
void reset_cpu(void)
|
2011-01-24 06:22:23 +00:00
|
|
|
{
|
2018-04-26 12:51:26 +00:00
|
|
|
#ifdef CONFIG_CPU_V7A
|
2011-01-24 06:22:23 +00:00
|
|
|
writel(0x1, samsung_get_base_swreset());
|
2016-04-23 16:48:12 +00:00
|
|
|
#endif
|
2011-01-24 06:22:23 +00:00
|
|
|
}
|
2012-08-07 03:24:03 +00:00
|
|
|
|
2019-05-03 13:41:00 +00:00
|
|
|
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
|
2012-08-07 03:24:03 +00:00
|
|
|
void enable_caches(void)
|
|
|
|
{
|
|
|
|
/* Enable D-cache. I-cache is already enabled in start.S */
|
|
|
|
dcache_enable();
|
|
|
|
}
|
|
|
|
#endif
|