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
32 #define LOOPBACK
33
34
35 #define NEXT_DEV NULL
36
37
38 #ifdef D_LINK
39 extern int d_link_init(struct device *);
40 static struct device d_link_dev = {
41 "dl0",
42 0,
43 0,
44 0,
45 0,
46 D_LINK_IO,
47 D_LINK_IRQ,
48 0, 0, 0,
49 NEXT_DEV,
50 d_link_init
51 };
52 # undef NEXT_DEV
53 # define NEXT_DEV (&d_link_dev)
54 #endif
55
56
57 #ifdef EL1
58 # ifndef EL1_IRQ
59 # define EL1_IRQ 9
60 # endif
61 extern int el1_init(struct device *);
62 static struct device el1_dev = {
63 "el0",
64 0,
65 0,
66 0,
67 0,
68 EL1,
69 EL1_IRQ,
70 0, 0, 0,
71 NEXT_DEV,
72 el1_init
73 };
74 # undef NEXT_DEV
75 # define NEXT_DEV (&el1_dev)
76 #endif
77
78 #if defined(EI8390) || defined(EL2) || defined(NE2000) \
79 || defined(WD80x3) || defined(HPLAN)
80 # ifndef EI8390
81 # define EI8390 0
82 # endif
83 # ifndef EI8390_IRQ
84 # define EI8390_IRQ 0
85 # endif
86 extern int ethif_init(struct device *);
87 static struct device ei8390_dev = {
88 "eth0",
89 0,
90 0,
91 0,
92 0,
93 EI8390,
94 EI8390_IRQ,
95 0, 0, 0,
96 NEXT_DEV,
97 ethif_init
98 };
99 # undef NEXT_DEV
100 # define NEXT_DEV (&ei8390_dev)
101 #endif
102
103 #ifdef PLIP
104 extern int plip_init(struct device *);
105 static struct device plip2_dev = {
106 "plip2",
107 0,
108 0,
109 0,
110 0,
111 0x278,
112 2,
113 0, 0, 0,
114 NEXT_DEV,
115 plip_init
116 };
117 static struct device plip1_dev = {
118 "plip1",
119 0,
120 0,
121 0,
122 0,
123 0x378,
124 7,
125 0, 0, 0,
126 &plip2_dev,
127 plip_init
128 };
129 static struct device plip0_dev = {
130 "plip0",
131 0,
132 0,
133 0,
134 0,
135 0x3BC,
136 5,
137 0, 0, 0,
138 &plip1_dev,
139 plip_init
140 };
141 # undef NEXT_DEV
142 # define NEXT_DEV (&plip0_dev)
143 #endif
144
145
146 #ifdef SLIP
147 extern int slip_init(struct device *);
148 static struct device slip3_dev = {
149 "sl3",
150 0x0,
151 0x0,
152 0x0,
153 0x0,
154 0x3,
155 0,
156 0, 0, 0,
157 NEXT_DEV,
158 slip_init
159 };
160 static struct device slip2_dev = {
161 "sl2",
162 0x0,
163 0x0,
164 0x0,
165 0x0,
166 0x2,
167 0,
168 0, 0, 0,
169 &slip3_dev,
170 slip_init
171 };
172 static struct device slip1_dev = {
173 "sl1",
174 0x0,
175 0x0,
176 0x0,
177 0x0,
178 0x1,
179 0,
180 0, 0, 0,
181 &slip2_dev,
182 slip_init
183 };
184 static struct device slip0_dev = {
185 "sl0",
186 0x0,
187 0x0,
188 0x0,
189 0x0,
190 0x0,
191 0,
192 0, 0, 0,
193 &slip1_dev,
194 slip_init
195 };
196 # undef NEXT_DEV
197 # define NEXT_DEV (&slip0_dev)
198 #endif
199
200
201 #ifdef LOOPBACK
202 extern int loopback_init(struct device *dev);
203 static struct device loopback_dev = {
204 "lo",
205 -1,
206 0x0,
207 -1,
208 0,
209 0,
210 0,
211 0, 0, 0,
212 NEXT_DEV,
213 loopback_init
214 };
215 # undef NEXT_DEV
216 # define NEXT_DEV (&loopback_dev)
217 #endif
218
219
220 struct device *dev_base = NEXT_DEV;