-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blackfin arch: rewrite blackfin_invalidate_entire_dcache function
rewrite blackfin_invalidate_entire_dcache() in C for easier management, better optimization, and so we take all SSYNC anomalies into account Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
- Loading branch information
Mike Frysinger
authored and
Bryan Wu
committed
Nov 18, 2008
1 parent
fe85cad
commit 3c1fbd5
Showing
3 changed files
with
25 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Blackfin cache control code (simpler control-style functions) | ||
* | ||
* Copyright 2004-2008 Analog Devices Inc. | ||
* | ||
* Enter bugs at http://blackfin.uclinux.org/ | ||
* | ||
* Licensed under the GPL-2 or later. | ||
*/ | ||
|
||
#include <asm/blackfin.h> | ||
|
||
/* Invalidate the Entire Data cache by | ||
* clearing DMC[1:0] bits | ||
*/ | ||
void blackfin_invalidate_entire_dcache(void) | ||
{ | ||
u32 dmem = bfin_read_DMEM_CONTROL(); | ||
SSYNC(); | ||
bfin_write_DMEM_CONTROL(dmem & ~0xc); | ||
SSYNC(); | ||
bfin_write_DMEM_CONTROL(dmem); | ||
SSYNC(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters