3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
9 * SPDX-License-Identifier: GPL-2.0+
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 * we turn off caches etc ...
32 disable_interrupts ();
34 /* ARM926E-S needs the protection unit enabled for the icache to have
35 * been enabled - left for possible later use
36 * should turn off the protection unit as well....
38 /* turn off I/D-cache */
48 static void cache_flush (void)
52 asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
53 asm ("mcr p15, 0, %0, c7, c6, 0": :"r" (i));
56 #ifndef CONFIG_INTEGRATOR
58 __attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
60 writew(0x0, 0xfffece10);
61 writew(0x8, 0xfffece10);
66 #endif /* #ifdef CONFIG_INTEGRATOR */