blob: 810fa348eeaf72843286cc352f723b36ecfad0ae [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Minkyu Kang008a3512011-01-24 15:22:23 +09002/*
3 * Copyright (c) 2010 Samsung Electronics.
4 * Minkyu Kang <mk7.kang@samsung.com>
Minkyu Kang008a3512011-01-24 15:22:23 +09005 */
6
7#include <common.h>
Simon Glass9edefc22019-11-14 12:57:37 -07008#include <cpu_func.h>
Simon Glass90526e92020-05-10 11:39:56 -06009#include <asm/cache.h>
Minkyu Kang008a3512011-01-24 15:22:23 +090010#include <asm/io.h>
Rajeshwari Shinde7ee68fe2012-11-29 20:29:35 +000011#include <asm/system.h>
12
Thomas Abraham95e74a32016-11-16 18:49:16 +053013#ifdef CONFIG_TARGET_ESPRESSO7420
14/*
15 * Exynos7420 uses CPU0 of Cluster-1 as boot CPU. Due to this, branch_if_master
16 * fails to identify as the boot CPU as the master CPU. As temporary workaround,
17 * setup the slave CPU boot address as "_main".
18 */
19extern void _main(void);
20void *secondary_boot_addr = (void *)_main;
21#endif /* CONFIG_TARGET_ESPRESSO7420 */
22
Minkyu Kang008a3512011-01-24 15:22:23 +090023void reset_cpu(ulong addr)
24{
Lokesh Vutlaacf15002018-04-26 18:21:26 +053025#ifdef CONFIG_CPU_V7A
Minkyu Kang008a3512011-01-24 15:22:23 +090026 writel(0x1, samsung_get_base_swreset());
Thomas Abraham36aa8932016-04-23 22:18:12 +053027#endif
Minkyu Kang008a3512011-01-24 15:22:23 +090028}
Łukasz Majewskid7957d12012-08-07 03:24:03 +000029
Trevor Woerner10015022019-05-03 09:41:00 -040030#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
Łukasz Majewskid7957d12012-08-07 03:24:03 +000031void enable_caches(void)
32{
33 /* Enable D-cache. I-cache is already enabled in start.S */
34 dcache_enable();
35}
36#endif