1 // SPDX-License-Identifier: GPL-2.0
2 /***************************************************************************/
5 * cache.c -- general ColdFire Cache maintenance code
7 * Copyright (C) 2010, Greg Ungerer (gerg@snapgear.com)
10 /***************************************************************************/
12 #include <linux/kernel.h>
13 #include <asm/coldfire.h>
14 #include <asm/mcfsim.h>
16 /***************************************************************************/
18 /***************************************************************************/
21 * Use cpushl to push all dirty cache lines back to memory.
22 * Older versions of GAS don't seem to know how to generate the
23 * ColdFire cpushl instruction... Oh well, bit stuff it for now.
26 void mcf_cache_push(void)
28 __asm__
__volatile__ (
41 : "i" (CACHE_LINE_SIZE
),
42 "i" (DCACHE_SIZE
/ CACHE_WAYS
),
47 /***************************************************************************/
48 #endif /* CACHE_PUSH */
49 /***************************************************************************/