aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/bcache.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-mips/bcache.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-mips/bcache.h')
-rw-r--r--include/asm-mips/bcache.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/include/asm-mips/bcache.h b/include/asm-mips/bcache.h
new file mode 100644
index 000000000000..446102b34f4e
--- /dev/null
+++ b/include/asm-mips/bcache.h
@@ -0,0 +1,62 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (c) 1997, 1999 by Ralf Baechle
7 * Copyright (c) 1999 Silicon Graphics, Inc.
8 */
9#ifndef _ASM_BCACHE_H
10#define _ASM_BCACHE_H
11
12#include <linux/config.h>
13
14/* Some R4000 / R4400 / R4600 / R5000 machines may have a non-dma-coherent,
15 chipset implemented caches. On machines with other CPUs the CPU does the
16 cache thing itself. */
17struct bcache_ops {
18 void (*bc_enable)(void);
19 void (*bc_disable)(void);
20 void (*bc_wback_inv)(unsigned long page, unsigned long size);
21 void (*bc_inv)(unsigned long page, unsigned long size);
22};
23
24extern void indy_sc_init(void);
25extern void sni_pcimt_sc_init(void);
26
27#ifdef CONFIG_BOARD_SCACHE
28
29extern struct bcache_ops *bcops;
30
31static inline void bc_enable(void)
32{
33 bcops->bc_enable();
34}
35
36static inline void bc_disable(void)
37{
38 bcops->bc_disable();
39}
40
41static inline void bc_wback_inv(unsigned long page, unsigned long size)
42{
43 bcops->bc_wback_inv(page, size);
44}
45
46static inline void bc_inv(unsigned long page, unsigned long size)
47{
48 bcops->bc_inv(page, size);
49}
50
51#else /* !defined(CONFIG_BOARD_SCACHE) */
52
53/* Not R4000 / R4400 / R4600 / R5000. */
54
55#define bc_enable() do { } while (0)
56#define bc_disable() do { } while (0)
57#define bc_wback_inv(page, size) do { } while (0)
58#define bc_inv(page, size) do { } while (0)
59
60#endif /* !defined(CONFIG_BOARD_SCACHE) */
61
62#endif /* _ASM_BCACHE_H */