diff options
Diffstat (limited to 'arch/blackfin/mach-common/cache-c.c')
-rw-r--r-- | arch/blackfin/mach-common/cache-c.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/blackfin/mach-common/cache-c.c b/arch/blackfin/mach-common/cache-c.c new file mode 100644 index 000000000000..e6ab1f815123 --- /dev/null +++ b/arch/blackfin/mach-common/cache-c.c | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * Blackfin cache control code (simpler control-style functions) | ||
3 | * | ||
4 | * Copyright 2004-2008 Analog Devices Inc. | ||
5 | * | ||
6 | * Enter bugs at http://blackfin.uclinux.org/ | ||
7 | * | ||
8 | * Licensed under the GPL-2 or later. | ||
9 | */ | ||
10 | |||
11 | #include <asm/blackfin.h> | ||
12 | |||
13 | /* Invalidate the Entire Data cache by | ||
14 | * clearing DMC[1:0] bits | ||
15 | */ | ||
16 | void blackfin_invalidate_entire_dcache(void) | ||
17 | { | ||
18 | u32 dmem = bfin_read_DMEM_CONTROL(); | ||
19 | SSYNC(); | ||
20 | bfin_write_DMEM_CONTROL(dmem & ~0xc); | ||
21 | SSYNC(); | ||
22 | bfin_write_DMEM_CONTROL(dmem); | ||
23 | SSYNC(); | ||
24 | } | ||