![Mike Frysinger](/assets/img/avatar_default.png)
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>
25 lines
493 B
C
25 lines
493 B
C
/*
|
|
* 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();
|
|
}
|