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>
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 ...
35 /* turn off I/D-cache */
47 static void cache_flush (void)
49 #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
52 asm ("mcr p15, 0, %0, c7, c7, 0": :"r" (i));