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>
23 DECLARE_GLOBAL_DATA_PTR;
26 static void cache_flush(void);
28 int cleanup_before_linux (void)
31 * this function is called just before we call linux
32 * it prepares the processor for linux
34 * just disable everything that can disturb booting linux
37 disable_interrupts ();
39 /* turn off I-cache */
50 static void cache_flush (void)
54 asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
57 #define RST_BASE 0x90030000
61 __attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
63 /* repeat endlessly */
65 writel(0, RST_BASE + RCSR);
66 writel(1, RST_BASE + RSRR);