1 // SPDX-License-Identifier: GPL-2.0+
4 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
8 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
20 #include <asm/system.h>
23 static void cache_flush(void);
25 int cleanup_before_linux (void)
28 * this function is called just before we call linux
29 * it prepares the processor for linux
31 * just disable everything that can disturb booting linux
36 /* turn off I-cache */
47 static void cache_flush (void)
51 asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
54 #define RST_BASE 0x90030000
58 __attribute__((noreturn)) void reset_cpu(void)
60 /* repeat endlessly */
62 writel(0, RST_BASE + RCSR);
63 writel(1, RST_BASE + RSRR);