1 // SPDX-License-Identifier: GPL-2.0+
4 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
5 * Marius Groeger <mgroeger@sysgo.de>
8 * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
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 * we turn off caches etc ...
35 /* ARM926E-S needs the protection unit enabled for the icache to have
36 * been enabled - left for possible later use
37 * should turn off the protection unit as well....
39 /* turn off I/D-cache */
49 static void cache_flush (void)
53 asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
54 asm ("mcr p15, 0, %0, c7, c6, 0": :"r" (i));
57 #ifndef CONFIG_ARCH_INTEGRATOR
59 __attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
61 writew(0x0, 0xfffece10);
62 writew(0x8, 0xfffece10);
67 #endif /* #ifdef CONFIG_ARCH_INTEGRATOR */