1 // SPDX-License-Identifier: GPL-2.0+
4 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
5 * Marius Groeger <mgroeger@sysgo.de>
8 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
9 * Alex Zuepke <azu@sysgo.de>
18 #include <asm/system.h>
21 static void cache_flush(void);
23 int cleanup_before_linux (void)
26 * this function is called just before we call linux
27 * it prepares the processor for linux
29 * just disable everything that can disturb booting linux
32 disable_interrupts ();
34 /* turn off I-cache */
45 static void cache_flush (void)
49 asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
52 #define RST_BASE 0x90030000
56 __attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
58 /* repeat endlessly */
60 writel(0, RST_BASE + RCSR);
61 writel(1, RST_BASE + RSRR);