blob: f9c746861199eae76be4f7bd8914841c2aa151b1 [file] [log] [blame]
Minkyu Kang008a3512011-01-24 15:22:23 +09001/*
2 * Copyright (c) 2010 Samsung Electronics.
3 * Minkyu Kang <mk7.kang@samsung.com>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Minkyu Kang008a3512011-01-24 15:22:23 +09006 */
7
8#include <common.h>
9#include <asm/io.h>
Rajeshwari Shinde7ee68fe2012-11-29 20:29:35 +000010#include <asm/system.h>
11
Minkyu Kang008a3512011-01-24 15:22:23 +090012void reset_cpu(ulong addr)
13{
Thomas Abraham36aa8932016-04-23 22:18:12 +053014#ifdef CONFIG_CPU_V7
Minkyu Kang008a3512011-01-24 15:22:23 +090015 writel(0x1, samsung_get_base_swreset());
Thomas Abraham36aa8932016-04-23 22:18:12 +053016#endif
Minkyu Kang008a3512011-01-24 15:22:23 +090017}
Ɓukasz Majewskid7957d12012-08-07 03:24:03 +000018
19#ifndef CONFIG_SYS_DCACHE_OFF
20void enable_caches(void)
21{
22 /* Enable D-cache. I-cache is already enabled in start.S */
23 dcache_enable();
24}
25#endif
Thomas Abrahame39448e2016-04-23 22:18:13 +053026
27#ifdef CONFIG_ARM64
28void lowlevel_init(void)
29{
30 armv8_switch_to_el2();
31 armv8_switch_to_el1();
32}
33#endif