This source file includes following definitions.
- wbflush_setup
- wbflush_kn01
- wbflush_kn210
- wbflush_mips
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #include <linux/export.h>
18 #include <linux/init.h>
19
20 #include <asm/bootinfo.h>
21 #include <asm/wbflush.h>
22 #include <asm/barrier.h>
23
24 static void wbflush_kn01(void);
25 static void wbflush_kn210(void);
26 static void wbflush_mips(void);
27
28 void (*__wbflush) (void);
29
30 void __init wbflush_setup(void)
31 {
32 switch (mips_machtype) {
33 case MACH_DS23100:
34 case MACH_DS5000_200:
35 __wbflush = wbflush_kn01;
36 break;
37 case MACH_DS5100:
38 __wbflush = wbflush_kn210;
39 break;
40 case MACH_DS5000_1XX:
41 case MACH_DS5000_XX:
42 case MACH_DS5000_2X0:
43 case MACH_DS5900:
44 default:
45 __wbflush = wbflush_mips;
46 break;
47 }
48 }
49
50
51
52
53
54 static void wbflush_kn01(void)
55 {
56 asm(".set\tpush\n\t"
57 ".set\tnoreorder\n\t"
58 "1:\tbc0f\t1b\n\t"
59 "nop\n\t"
60 ".set\tpop");
61 }
62
63
64
65
66
67 static void wbflush_kn210(void)
68 {
69 asm(".set\tpush\n\t"
70 ".set\tnoreorder\n\t"
71 "mfc0\t$2,$12\n\t"
72 "lui\t$3,0x8000\n\t"
73 "or\t$3,$2,$3\n\t"
74 "mtc0\t$3,$12\n\t"
75 "nop\n"
76 "1:\tbc3f\t1b\n\t"
77 "nop\n\t"
78 "mtc0\t$2,$12\n\t"
79 "nop\n\t"
80 ".set\tpop"
81 : : : "$2", "$3");
82 }
83
84
85
86
87
88 static void wbflush_mips(void)
89 {
90 __fast_iob();
91 }
92 EXPORT_SYMBOL(__wbflush);