summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64/bcache.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-17 23:32:45 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-17 23:32:45 +0000
commitbb382d1cd598a97151a0edf5ac26e36afb0a64ce (patch)
treefd9f0ca1b31e5af2faa0d7165e6fd0fbb5524ebf /include/asm-mips64/bcache.h
parentaf38bda129551834653720f277a920d7d284bd3d (diff)
- IOC3 driver now will panic when encountering a RX/TX PCI DMA error.
- IOC3 driver does no longer use GFP_DMA which given the _very_ small number of available GFP_DMA pages might have deadlocked the system. - First cut of Origin support. Last minute change: Do no longer use ARC memory / MD hub memory configuration information but klconfig.h stuff. Simpler, faster, shorter. - Zillions of MIPS64 fixes.
Diffstat (limited to 'include/asm-mips64/bcache.h')
-rw-r--r--include/asm-mips64/bcache.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/asm-mips64/bcache.h b/include/asm-mips64/bcache.h
index e3507bb04..0df4edb7d 100644
--- a/include/asm-mips64/bcache.h
+++ b/include/asm-mips64/bcache.h
@@ -5,10 +5,17 @@
* for more details.
*
* Copyright (c) 1997, 1999 by Ralf Baechle
+ * Copyright (c) 1999 Silicon Graphics, Inc.
*/
#ifndef _ASM_BCACHE_H
#define _ASM_BCACHE_H
+#include <linux/config.h>
+
+#ifdef CONFIG_BOARD_SCACHE
+
+/* Some R4000 / R4400 / R4600 / R5000 machines may have chipset implemented
+ caches. On machines with other CPUs the CPU does the cache thing itself. */
struct bcache_ops {
void (*bc_enable)(void);
void (*bc_disable)(void);
@@ -21,4 +28,35 @@ extern void sni_pcimt_sc_init(void);
extern struct bcache_ops *bcops;
+void inline bc_enable(void)
+{
+ bcops->bc_enable();
+}
+
+void inline bc_disable(void)
+{
+ bcops->bc_disble();
+}
+
+void bc_wback_inv(unsigned long page, unsigned long size)
+{
+ bcops->bc_wback_inv(page, size);
+}
+
+void bc_inv(unsigned long page, unsigned long size)
+{
+ bcops->bc_inv(page, size);
+}
+
+#else /* !defined(CONFIG_BOARD_SCACHE) */
+
+/* Not R4000 / R4400 / R4600 / R5000. */
+
+#define bc_enable() do { } while (0)
+#define bc_disable() do { } while (0)
+#define bc_wback_inv(page, size) do { } while (0)
+#define bc_inv(page, size) do { } while (0)
+
+#endif /* !defined(CONFIG_BOARD_SCACHE) */
+
#endif /* _ASM_BCACHE_H */