]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - arch/arm/cpu/arm925t/cpu.c
samsung: trats2: add support for new board Trats2
[karo-tx-uboot.git] / arch / arm / cpu / arm925t / cpu.c
1 /*
2  * (C) Copyright 2002
3  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4  * Marius Groeger <mgroeger@sysgo.de>
5  *
6  * (C) Copyright 2002
7  * Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
8  *
9  * SPDX-License-Identifier:     GPL-2.0+
10  */
11
12 /*
13  * CPU specific code
14  */
15
16 #include <common.h>
17 #include <command.h>
18 #include <arm925t.h>
19 #include <asm/system.h>
20
21 static void cache_flush(void);
22
23 int cleanup_before_linux (void)
24 {
25         /*
26          * this function is called just before we call linux
27          * it prepares the processor for linux
28          *
29          * we turn off caches etc ...
30          */
31
32         disable_interrupts ();
33
34
35         /* turn off I/D-cache */
36         icache_disable();
37         dcache_disable();
38         /* flush I/D-cache */
39         cache_flush();
40
41         return 0;
42 }
43
44 /* flush I/D-cache */
45 static void cache_flush (void)
46 {
47         unsigned long i = 0;
48
49         asm ("mcr p15, 0, %0, c7, c7, 0": :"r" (i));
50 }