[TG3]: Add tagged status support.
[linux-2.6/verdex.git] / include / asm-mips / bcache.h
blob446102b34f4e8702088025ca67cb71ac22c6ebc3
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.
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
12 #include <linux/config.h>
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. */
17 struct 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);
24 extern void indy_sc_init(void);
25 extern void sni_pcimt_sc_init(void);
27 #ifdef CONFIG_BOARD_SCACHE
29 extern struct bcache_ops *bcops;
31 static inline void bc_enable(void)
33 bcops->bc_enable();
36 static inline void bc_disable(void)
38 bcops->bc_disable();
41 static inline void bc_wback_inv(unsigned long page, unsigned long size)
43 bcops->bc_wback_inv(page, size);
46 static inline void bc_inv(unsigned long page, unsigned long size)
48 bcops->bc_inv(page, size);
51 #else /* !defined(CONFIG_BOARD_SCACHE) */
53 /* Not R4000 / R4400 / R4600 / R5000. */
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)
60 #endif /* !defined(CONFIG_BOARD_SCACHE) */
62 #endif /* _ASM_BCACHE_H */