3 * Ilya Yanok, EmCraft Systems
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
22 #include <linux/types.h>
25 #ifndef CONFIG_SYS_DCACHE_OFF
26 static inline void dcache_noop(void)
28 if (dcache_status()) {
29 puts("WARNING: cache operations are not implemented!\n"
30 "WARNING: disabling D-Cache now, you can re-enable it"
31 "later with 'dcache on' command\n");
36 void invalidate_dcache_all(void)
41 void invalidate_dcache_range(unsigned long start, unsigned long stop)
46 void flush_dcache_range(unsigned long start, unsigned long stop)
50 #else /* #ifndef CONFIG_SYS_DCACHE_OFF */
51 void invalidate_dcache_all(void)
55 void flush_dcache_all(void)
59 void invalidate_dcache_range(unsigned long start, unsigned long stop)
63 void flush_dcache_range(unsigned long start, unsigned long stop)
67 void flush_cache(unsigned long start, unsigned long size)
70 #endif /* #ifndef CONFIG_SYS_DCACHE_OFF */