This source file includes following definitions.
- ethif_probe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 #include <linux/config.h>
28 #include <linux/ddi.h>
29 #include "dev.h"
30
31 #define LOOPBACK
32
33 #define NEXT_DEV NULL
34
35
36
37
38
39
40 extern int wd_probe(struct device *dev);
41 extern int el2_probe(struct device *dev);
42 extern int ne_probe(struct device *dev);
43 extern int hp_probe(struct device *dev);
44 extern int znet_probe(struct device *);
45 extern int express_probe(struct device *);
46 extern int el3_probe(struct device *);
47 extern int atp_probe(struct device *);
48 extern int at1500_probe(struct device *);
49 extern int depca_probe(struct device *);
50 extern int el1_probe(struct device *);
51
52 static int
53 ethif_probe(struct device *dev)
54 {
55 short base_addr = dev->base_addr;
56
57 if (base_addr < 0 || base_addr == 1)
58 return 1;
59
60 if (1
61 #if defined(CONFIG_WD80x3) || defined(WD80x3)
62 && wd_probe(dev)
63 #endif
64 #if defined(CONFIG_EL2) || defined(EL2)
65 && el2_probe(dev)
66 #endif
67 #if defined(CONFIG_NE2000) || defined(NE2000)
68 && ne_probe(dev)
69 #endif
70 #if defined(CONFIG_HPLAN) || defined(HPLAN)
71 && hp_probe(dev)
72 #endif
73 #ifdef CONFIG_AT1500
74 && at1500_probe(dev)
75 #endif
76 #ifdef CONFIG_EL3
77 && el3_probe(dev)
78 #endif
79 #ifdef CONFIG_ZNET
80 && znet_probe(dev)
81 #endif
82 #ifdef CONFIG_EEXPRESS
83 && express_probe(dev)
84 #endif
85 #ifdef CONFIG_ATP
86 && atp_probe(dev)
87 #endif
88 #ifdef CONFIG_DEPCA
89 && depca_probe(dev)
90 #endif
91 #ifdef CONFIG_EL1
92 && el1_probe(dev)
93 #endif
94 && 1 ) {
95 return 1;
96 }
97 return 0;
98 }
99
100
101
102
103 #if defined(D_LINK) || defined(CONFIG_DE600)
104 extern int d_link_init(struct device *);
105 static struct device d_link_dev = {
106 "dl0",
107 0,
108 0,
109 0,
110 0,
111 D_LINK_IO,
112 D_LINK_IRQ,
113 0, 0, 0,
114 NEXT_DEV,
115 d_link_init
116 };
117 # undef NEXT_DEV
118 # define NEXT_DEV (&d_link_dev)
119 #endif
120
121
122 #ifdef EI8390
123 # define ETH0_ADDR EI8390
124 #else
125 # define ETH0_ADDR 0
126 #endif
127 #ifdef EI8390_IRQ
128 # define ETH0_IRQ EI8390_IRQ
129 #else
130 # define ETH0_IRQ 0
131 #endif
132
133
134
135 static struct device eth3_dev = {
136 "eth3", 0,0,0,0,0xffe0 , 0,0,0,0, NEXT_DEV, ethif_probe };
137 static struct device eth2_dev = {
138 "eth2", 0,0,0,0,0xffe0 , 0,0,0,0, ð3_dev, ethif_probe };
139 static struct device eth1_dev = {
140 "eth1", 0,0,0,0,0xffe0 , 0,0,0,0, ð2_dev, ethif_probe };
141
142 static struct device eth0_dev = {
143 "eth0", 0, 0, 0, 0, ETH0_ADDR, ETH0_IRQ, 0, 0, 0, ð1_dev, ethif_probe };
144
145 # undef NEXT_DEV
146 # define NEXT_DEV (ð0_dev)
147
148 #if defined(PLIP) || defined(CONFIG_PLIP)
149 extern int plip_init(struct device *);
150 static struct device plip2_dev = {
151 "plip2", 0, 0, 0, 0, 0x278, 2, 0, 0, 0, NEXT_DEV, plip_init, };
152 static struct device plip1_dev = {
153 "plip1", 0, 0, 0, 0, 0x378, 7, 0, 0, 0, &plip2_dev, plip_init, };
154 static struct device plip0_dev = {
155 "plip0", 0, 0, 0, 0, 0x3BC, 5, 0, 0, 0, &plip1_dev, plip_init, };
156 # undef NEXT_DEV
157 # define NEXT_DEV (&plip0_dev)
158 #endif
159
160 #if defined(SLIP) || defined(CONFIG_SLIP)
161 extern int slip_init(struct device *);
162 static struct device slip3_dev = {
163 "sl3",
164 0x0,
165 0x0,
166 0x0,
167 0x0,
168 0x3,
169 0,
170 0, 0, 0,
171 NEXT_DEV,
172 slip_init
173 };
174 static struct device slip2_dev = {
175 "sl2",
176 0x0,
177 0x0,
178 0x0,
179 0x0,
180 0x2,
181 0,
182 0, 0, 0,
183 &slip3_dev,
184 slip_init
185 };
186 static struct device slip1_dev = {
187 "sl1",
188 0x0,
189 0x0,
190 0x0,
191 0x0,
192 0x1,
193 0,
194 0, 0, 0,
195 &slip2_dev,
196 slip_init
197 };
198 static struct device slip0_dev = {
199 "sl0",
200 0x0,
201 0x0,
202 0x0,
203 0x0,
204 0x0,
205 0,
206 0, 0, 0,
207 &slip1_dev,
208 slip_init
209 };
210 # undef NEXT_DEV
211 # define NEXT_DEV (&slip0_dev)
212 #endif
213
214
215 #ifdef LOOPBACK
216 extern int loopback_init(struct device *dev);
217 static struct device loopback_dev = {
218 "lo",
219 0x0,
220 0x0,
221 0x0,
222 0x0,
223 0,
224 0,
225 0, 0, 0,
226 NEXT_DEV,
227 loopback_init
228 };
229 # undef NEXT_DEV
230 # define NEXT_DEV (&loopback_dev)
231 #endif
232
233
234 struct device *dev_base = NEXT_DEV;