]> rtime.felk.cvut.cz Git - mcf548x/linux.git/blob - arch/m68k/coldfire/cache.c
deubootization, added cache.c and ints.c in arch
[mcf548x/linux.git] / arch / m68k / coldfire / cache.c
1 /*
2  *  linux/arch/m68k/coldfire/cache.c
3  *
4  *  Matt Waddel Matt.Waddel@freescale.com
5  *  Kurt Mahan kmahan@freescale.com
6  *  Copyright Freescale Semiconductor, Inc. 2007
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  */
13
14 #include <linux/interrupt.h>
15 #include <asm/cache.h>
16 #include <asm/coldfire.h>
17 #include <asm/system.h>
18
19 /* Cache Control Reg shadow reg */
20 unsigned long shadow_cacr;
21
22 /**
23  * cacr_set - Set the Cache Control Register
24  * @x Value to set
25  */
26 void cacr_set(unsigned long x)
27 {
28         shadow_cacr = x;
29
30         __asm__ __volatile__ ("movec %0, %%cacr"
31                               : /* no outputs */
32                               : "r" (shadow_cacr));
33 }
34
35 /**
36  * cacr_get - Get the current value of the Cache Control Register
37  *
38  * @return CACR value
39  */
40 unsigned long cacr_get(void)
41 {
42         return shadow_cacr;
43 }