blob: 58cde9391f2f5a83c19bad8bb2abbee5f8152e2d [file] [log] [blame]
rev13@wp.pl12d8a722015-03-01 12:44:39 +01001/*
2 * (C) Copyright 2010,2011
3 * Vladimir Khusainov, Emcraft Systems, vlad@emcraft.com
4 *
5 * (C) Copyright 2015
Kamil Lulko5be93562015-11-29 11:50:53 +01006 * Kamil Lulko, <kamil.lulko@gmail.com>
rev13@wp.pl12d8a722015-03-01 12:44:39 +01007 *
8 * SPDX-License-Identifier: GPL-2.0+
9 */
10
11#include <common.h>
12#include <asm/io.h>
13#include <asm/armv7m.h>
14
15/*
16 * This is called right before passing control to
17 * the Linux kernel point.
18 */
19int cleanup_before_linux(void)
20{
21 return 0;
22}
23
24/*
25 * Perform the low-level reset.
26 */
27void reset_cpu(ulong addr)
28{
29 /*
30 * Perform reset but keep priority group unchanged.
31 */
32 writel((V7M_AIRCR_VECTKEY << V7M_AIRCR_VECTKEY_SHIFT)
33 | (V7M_SCB->aircr & V7M_AIRCR_PRIGROUP_MSK)
34 | V7M_AIRCR_SYSRESET, &V7M_SCB->aircr);
35}