2 * File: arch/blackfin/mach-common/cache.S
4 * Author: LG Soft India
7 * Description: cache control support
10 * Copyright 2004-2006 Analog Devices Inc.
12 * Bugs: Enter bugs at http://blackfin.uclinux.org/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, see the file COPYING, or write
26 * to the Free Software Foundation, Inc.,
27 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
30 #include <linux/linkage.h>
32 #include <asm/entry.h>
33 #include <asm/blackfin.h>
34 #include <asm/cache.h>
39 * blackfin_cache_flush_range(start, end)
40 * Invalidate all cache lines assocoiated with this
43 * start: Start address
46 ENTRY(_blackfin_icache_flush_range)
60 ENDPROC(_blackfin_icache_flush_range)
63 * blackfin_icache_dcache_flush_range(start, end)
64 * FLUSH all cache lines assocoiated with this
67 * start: Start address
71 ENTRY(_blackfin_icache_dcache_flush_range)
87 ENDPROC(_blackfin_icache_dcache_flush_range)
89 /* Throw away all D-cached data in specified region without any obligation to
90 * write them back. However, we must clean the D-cached entries around the
91 * boundaries of the start and/or end address is not cache aligned.
93 * Start: start address,
97 ENTRY(_blackfin_dcache_invalidate_range)
109 /* If the data crosses a cache line, then we'll be pointing to
110 * the last cache line, but won't have flushed/invalidated it yet,
116 ENDPROC(_blackfin_dcache_invalidate_range)
118 ENTRY(_blackfin_dcache_flush_range)
119 R2 = -L1_CACHE_BYTES;
130 /* If the data crosses a cache line, then we'll be pointing to
131 * the last cache line, but won't have flushed it yet, so do
137 ENDPROC(_blackfin_dcache_flush_range)
139 ENTRY(_blackfin_dflush_page)
140 P1 = 1 << (PAGE_SHIFT - L1_CACHE_SHIFT);
144 LSETUP (.Lfl1, .Lfl1) LC0 = P1;
148 ENDPROC(_blackfin_dflush_page)