2 * Setup the right wbflush routine for the different DECstations.
4 * Created with information from:
5 * DECstation 3100 Desktop Workstation Functional Specification
6 * DECstation 5000/200 KN02 System Module Functional Specification
7 * mipsel-linux-objdump --disassemble vmunix | grep "wbflush" :-)
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file "COPYING" in the main directory of this archive
13 * Copyright (C) 1998 Harald Koerfgen
14 * Copyright (C) 2002 Maciej W. Rozycki
17 #include <linux/export.h>
18 #include <linux/init.h>
20 #include <asm/bootinfo.h>
21 #include <asm/wbflush.h>
22 #include <asm/barrier.h>
24 static void wbflush_kn01(void);
25 static void wbflush_kn210(void);
26 static void wbflush_mips(void);
28 void (*__wbflush
) (void);
30 void __init
wbflush_setup(void)
32 switch (mips_machtype
) {
34 case MACH_DS5000_200
: /* DS5000 3max */
35 __wbflush
= wbflush_kn01
;
37 case MACH_DS5100
: /* DS5100 MIPSMATE */
38 __wbflush
= wbflush_kn210
;
40 case MACH_DS5000_1XX
: /* DS5000/100 3min */
41 case MACH_DS5000_XX
: /* Personal DS5000/2x */
42 case MACH_DS5000_2X0
: /* DS5000/240 3max+ */
43 case MACH_DS5900
: /* DS5900 bigmax */
45 __wbflush
= wbflush_mips
;
51 * For the DS3100 and DS5000/200 the R2020/R3220 writeback buffer functions
52 * as part of Coprocessor 0.
54 static void wbflush_kn01(void)
64 * For the DS5100 the writeback buffer seems to be a part of Coprocessor 3.
65 * But CP3 has to enabled first.
67 static void wbflush_kn210(void)
85 * I/O ASIC systems use a standard writeback buffer that gets flushed
86 * upon an uncached read.
88 static void wbflush_mips(void)
92 EXPORT_SYMBOL(__wbflush
);