3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4 * Marius Groeger <mgroeger@sysgo.de>
7 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
8 * Alex Zuepke <azu@sysgo.de>
10 * SPDX-License-Identifier: GPL-2.0+
19 #include <asm/system.h>
22 static void cache_flush(void);
24 int cleanup_before_linux (void)
27 * this function is called just before we call linux
28 * it prepares the processor for linux
30 * just disable everything that can disturb booting linux
33 disable_interrupts ();
35 /* turn off I-cache */
46 static void cache_flush (void)
50 asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
53 #define RST_BASE 0x90030000
57 __attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
59 /* repeat endlessly */
61 writel(0, RST_BASE + RCSR);
62 writel(1, RST_BASE + RSRR);