blob: c4cf59dabbd44d8361745d5e5a0be5ade085e040 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Minkyu Kangb1b24682011-01-24 15:22:23 +09002/*
3 * Copyright (c) 2010 Samsung Electronics.
4 * Minkyu Kang <mk7.kang@samsung.com>
Minkyu Kangb1b24682011-01-24 15:22:23 +09005 */
6
7#include <common.h>
Simon Glass1d91ba72019-11-14 12:57:37 -07008#include <cpu_func.h>
Minkyu Kangb1b24682011-01-24 15:22:23 +09009#include <asm/io.h>
Rajeshwari Shinde10cb7fa2012-11-29 20:29:35 +000010#include <asm/system.h>
11
Thomas Abrahamf1855fc2016-11-16 18:49:16 +053012#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 */
18extern void _main(void);
19void *secondary_boot_addr = (void *)_main;
20#endif /* CONFIG_TARGET_ESPRESSO7420 */
21
Minkyu Kangb1b24682011-01-24 15:22:23 +090022void reset_cpu(ulong addr)
23{
Lokesh Vutla81b1a672018-04-26 18:21:26 +053024#ifdef CONFIG_CPU_V7A
Minkyu Kangb1b24682011-01-24 15:22:23 +090025 writel(0x1, samsung_get_base_swreset());
Thomas Abrahama99ad392016-04-23 22:18:12 +053026#endif
Minkyu Kangb1b24682011-01-24 15:22:23 +090027}
Łukasz Majewskie667e762012-08-07 03:24:03 +000028
Trevor Woerner43ec7e02019-05-03 09:41:00 -040029#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF)
Łukasz Majewskie667e762012-08-07 03:24:03 +000030void enable_caches(void)
31{
32 /* Enable D-cache. I-cache is already enabled in start.S */
33 dcache_enable();
34}
35#endif