1 /***************************************************************************/
4 * cache.c -- general ColdFire Cache maintenance code
6 * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com)
9 /***************************************************************************/
11 #include <linux/kernel.h>
12 #include <asm/coldfire.h>
13 #include <asm/mcfsim.h>
15 /***************************************************************************/
17 /***************************************************************************/
20 * Use cpushl to push all dirty cache lines back to memory.
21 * Older versions of GAS don't seem to know how to generate the
22 * ColdFire cpushl instruction... Oh well, bit stuff it for now.
25 void mcf_cache_push(void)
27 __asm__
__volatile__ (
40 : "i" (CACHE_LINE_SIZE
),
41 "i" (DCACHE_SIZE
/ CACHE_WAYS
),
46 /***************************************************************************/
47 #endif /* CACHE_PUSH */
48 /***************************************************************************/