Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127030
b: refs/heads/master
c: 3c1fbd5
h: refs/heads/master
v: v3
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Nov 18, 2008
1 parent 92bd0d9 commit 20c77bd
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe85cad25e56aad5e020ea5cab50a100892f645b
refs/heads/master: 3c1fbd5184f9c3c52c0a392fae0efb0b0d99a079
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

obj-y := \
cache.o entry.o head.o \
cache.o cache-c.o entry.o head.o \
interrupt.o irqpanic.o arch_checks.o ints-priority.o

obj-$(CONFIG_BFIN_ICACHE_LOCK) += lock.o
Expand Down
24 changes: 24 additions & 0 deletions trunk/arch/blackfin/mach-common/cache-c.c
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();
}
36 changes: 0 additions & 36 deletions trunk/arch/blackfin/mach-common/cache.S
Original file line number Diff line number Diff line change
Expand Up @@ -97,39 +97,3 @@ ENTRY(_blackfin_dflush_page)
P1 = 1 << (PAGE_SHIFT - L1_CACHE_SHIFT);
jump .Ldfr;
ENDPROC(_blackfin_dflush_page)

/* Invalidate the Entire Data cache by
* clearing DMC[1:0] bits
*/
ENTRY(_blackfin_invalidate_entire_dcache)
[--SP] = ( R7:5);

P0.L = LO(DMEM_CONTROL);
P0.H = HI(DMEM_CONTROL);
R7 = [P0];
R5 = R7; /* Save DMEM_CNTR */

/* Clear the DMC[1:0] bits, All valid bits in the data
* cache are set to the invalid state
*/
BITCLR(R7,DMC0_P);
BITCLR(R7,DMC1_P);
CLI R6;
SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
.align 8;
[P0] = R7;
SSYNC;
STI R6;

/* Configures the data cache again */

CLI R6;
SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
.align 8;
[P0] = R5;
SSYNC;
STI R6;

( R7:5) = [SP++];
RTS;
ENDPROC(_blackfin_invalidate_entire_dcache)

0 comments on commit 20c77bd

Please sign in to comment.