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
16 #include <asm/bootinfo.h>
19 static void wbflush_kn01(void);
20 static void wbflush_kn210(void);
21 static void wbflush_kn02ba(void);
22 static void wbflush_kn03(void);
24 void (*__wbflush
) (void);
26 __initfunc(void wbflush_setup(void))
28 switch (mips_machtype
) {
30 __wbflush
= wbflush_kn01
;
32 case MACH_DS5100
: /* DS5100 MIPSMATE */
33 __wbflush
= wbflush_kn210
;
35 case MACH_DS5000_200
: /* DS5000 3max */
36 __wbflush
= wbflush_kn01
;
38 case MACH_DS5000_1XX
: /* DS5000/100 3min */
39 __wbflush
= wbflush_kn02ba
;
41 case MACH_DS5000_2X0
: /* DS5000/240 3max+ */
42 __wbflush
= wbflush_kn03
;
44 case MACH_DS5000_XX
: /* Personal DS5000/2x */
45 __wbflush
= wbflush_kn02ba
;
51 * For the DS3100 and DS5000/200 the 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 * Looks like some magic with the System Interrupt Mask Register
86 * in the famous IOASIC for kmins and maxines.
88 static void wbflush_kn02ba(void)
93 "lw\t$3,0x120($2)\n\t"
94 "lw\t$3,0x120($2)\n\t"
100 * The DS500/2x0 doesnt need to write back the WB.
102 static void wbflush_kn03(void)