Xenomai 3.3.2
Loading...
Searching...
No Matches
16550A_pnp.h
1/*
2 * Copyright (C) 2006-2007 Jan Kiszka <jan.kiszka@web.de>.
3 *
4 * Xenomai is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * Xenomai is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Xenomai; if not, write to the Free Software Foundation,
16 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#if defined(CONFIG_PNP) && \
20 (defined(CONFIG_XENO_DRIVERS_16550A_PIO) || \
21 defined(CONFIG_XENO_DRIVERS_16550A_ANY))
22
23#include <linux/pnp.h>
24
25#define UNKNOWN_DEV 0x3000
26
27/* Bluntly cloned from drivers/serial/8250_pnp.c */
28static const struct pnp_device_id rt_16550_pnp_tbl[] = {
29 /* Archtek America Corp. */
30 /* Archtek SmartLink Modem 3334BT Plug & Play */
31 { "AAC000F", 0 },
32 /* Anchor Datacomm BV */
33 /* SXPro 144 External Data Fax Modem Plug & Play */
34 { "ADC0001", 0 },
35 /* SXPro 288 External Data Fax Modem Plug & Play */
36 { "ADC0002", 0 },
37 /* PROLiNK 1456VH ISA PnP K56flex Fax Modem */
38 { "AEI0250", 0 },
39 /* Actiontec ISA PNP 56K X2 Fax Modem */
40 { "AEI1240", 0 },
41 /* Rockwell 56K ACF II Fax+Data+Voice Modem */
42 { "AKY1021", 0 /*SPCI_FL_NO_SHIRQ*/ },
43 /* AZT3005 PnP SOUND DEVICE */
44 { "AZT4001", 0 },
45 /* Best Data Products Inc. Smart One 336F PnP Modem */
46 { "BDP3336", 0 },
47 /* Boca Research */
48 /* Boca Complete Ofc Communicator 14.4 Data-FAX */
49 { "BRI0A49", 0 },
50 /* Boca Research 33,600 ACF Modem */
51 { "BRI1400", 0 },
52 /* Boca 33.6 Kbps Internal FD34FSVD */
53 { "BRI3400", 0 },
54 /* Boca 33.6 Kbps Internal FD34FSVD */
55 { "BRI0A49", 0 },
56 /* Best Data Products Inc. Smart One 336F PnP Modem */
57 { "BDP3336", 0 },
58 /* Computer Peripherals Inc */
59 /* EuroViVa CommCenter-33.6 SP PnP */
60 { "CPI4050", 0 },
61 /* Creative Labs */
62 /* Creative Labs Phone Blaster 28.8 DSVD PnP Voice */
63 { "CTL3001", 0 },
64 /* Creative Labs Modem Blaster 28.8 DSVD PnP Voice */
65 { "CTL3011", 0 },
66 /* Creative */
67 /* Creative Modem Blaster Flash56 DI5601-1 */
68 { "DMB1032", 0 },
69 /* Creative Modem Blaster V.90 DI5660 */
70 { "DMB2001", 0 },
71 /* E-Tech */
72 /* E-Tech CyberBULLET PC56RVP */
73 { "ETT0002", 0 },
74 /* FUJITSU */
75 /* Fujitsu 33600 PnP-I2 R Plug & Play */
76 { "FUJ0202", 0 },
77 /* Fujitsu FMV-FX431 Plug & Play */
78 { "FUJ0205", 0 },
79 /* Fujitsu 33600 PnP-I4 R Plug & Play */
80 { "FUJ0206", 0 },
81 /* Fujitsu Fax Voice 33600 PNP-I5 R Plug & Play */
82 { "FUJ0209", 0 },
83 /* Archtek America Corp. */
84 /* Archtek SmartLink Modem 3334BT Plug & Play */
85 { "GVC000F", 0 },
86 /* Hayes */
87 /* Hayes Optima 288 V.34-V.FC + FAX + Voice Plug & Play */
88 { "HAY0001", 0 },
89 /* Hayes Optima 336 V.34 + FAX + Voice PnP */
90 { "HAY000C", 0 },
91 /* Hayes Optima 336B V.34 + FAX + Voice PnP */
92 { "HAY000D", 0 },
93 /* Hayes Accura 56K Ext Fax Modem PnP */
94 { "HAY5670", 0 },
95 /* Hayes Accura 56K Ext Fax Modem PnP */
96 { "HAY5674", 0 },
97 /* Hayes Accura 56K Fax Modem PnP */
98 { "HAY5675", 0 },
99 /* Hayes 288, V.34 + FAX */
100 { "HAYF000", 0 },
101 /* Hayes Optima 288 V.34 + FAX + Voice, Plug & Play */
102 { "HAYF001", 0 },
103 /* IBM */
104 /* IBM Thinkpad 701 Internal Modem Voice */
105 { "IBM0033", 0 },
106 /* Intertex */
107 /* Intertex 28k8 33k6 Voice EXT PnP */
108 { "IXDC801", 0 },
109 /* Intertex 33k6 56k Voice EXT PnP */
110 { "IXDC901", 0 },
111 /* Intertex 28k8 33k6 Voice SP EXT PnP */
112 { "IXDD801", 0 },
113 /* Intertex 33k6 56k Voice SP EXT PnP */
114 { "IXDD901", 0 },
115 /* Intertex 28k8 33k6 Voice SP INT PnP */
116 { "IXDF401", 0 },
117 /* Intertex 28k8 33k6 Voice SP EXT PnP */
118 { "IXDF801", 0 },
119 /* Intertex 33k6 56k Voice SP EXT PnP */
120 { "IXDF901", 0 },
121 /* Kortex International */
122 /* KORTEX 28800 Externe PnP */
123 { "KOR4522", 0 },
124 /* KXPro 33.6 Vocal ASVD PnP */
125 { "KORF661", 0 },
126 /* Lasat */
127 /* LASAT Internet 33600 PnP */
128 { "LAS4040", 0 },
129 /* Lasat Safire 560 PnP */
130 { "LAS4540", 0 },
131 /* Lasat Safire 336 PnP */
132 { "LAS5440", 0 },
133 /* Microcom, Inc. */
134 /* Microcom TravelPorte FAST V.34 Plug & Play */
135 { "MNP0281", 0 },
136 /* Microcom DeskPorte V.34 FAST or FAST+ Plug & Play */
137 { "MNP0336", 0 },
138 /* Microcom DeskPorte FAST EP 28.8 Plug & Play */
139 { "MNP0339", 0 },
140 /* Microcom DeskPorte 28.8P Plug & Play */
141 { "MNP0342", 0 },
142 /* Microcom DeskPorte FAST ES 28.8 Plug & Play */
143 { "MNP0500", 0 },
144 /* Microcom DeskPorte FAST ES 28.8 Plug & Play */
145 { "MNP0501", 0 },
146 /* Microcom DeskPorte 28.8S Internal Plug & Play */
147 { "MNP0502", 0 },
148 /* Motorola */
149 /* Motorola BitSURFR Plug & Play */
150 { "MOT1105", 0 },
151 /* Motorola TA210 Plug & Play */
152 { "MOT1111", 0 },
153 /* Motorola HMTA 200 (ISDN) Plug & Play */
154 { "MOT1114", 0 },
155 /* Motorola BitSURFR Plug & Play */
156 { "MOT1115", 0 },
157 /* Motorola Lifestyle 28.8 Internal */
158 { "MOT1190", 0 },
159 /* Motorola V.3400 Plug & Play */
160 { "MOT1501", 0 },
161 /* Motorola Lifestyle 28.8 V.34 Plug & Play */
162 { "MOT1502", 0 },
163 /* Motorola Power 28.8 V.34 Plug & Play */
164 { "MOT1505", 0 },
165 /* Motorola ModemSURFR External 28.8 Plug & Play */
166 { "MOT1509", 0 },
167 /* Motorola Premier 33.6 Desktop Plug & Play */
168 { "MOT150A", 0 },
169 /* Motorola VoiceSURFR 56K External PnP */
170 { "MOT150F", 0 },
171 /* Motorola ModemSURFR 56K External PnP */
172 { "MOT1510", 0 },
173 /* Motorola ModemSURFR 56K Internal PnP */
174 { "MOT1550", 0 },
175 /* Motorola ModemSURFR Internal 28.8 Plug & Play */
176 { "MOT1560", 0 },
177 /* Motorola Premier 33.6 Internal Plug & Play */
178 { "MOT1580", 0 },
179 /* Motorola OnlineSURFR 28.8 Internal Plug & Play */
180 { "MOT15B0", 0 },
181 /* Motorola VoiceSURFR 56K Internal PnP */
182 { "MOT15F0", 0 },
183 /* Com 1 */
184 /* Deskline K56 Phone System PnP */
185 { "MVX00A1", 0 },
186 /* PC Rider K56 Phone System PnP */
187 { "MVX00F2", 0 },
188 /* NEC 98NOTE SPEAKER PHONE FAX MODEM(33600bps) */
189 { "nEC8241", 0 },
190 /* Pace 56 Voice Internal Plug & Play Modem */
191 { "PMC2430", 0 },
192 /* Generic */
193 /* Generic standard PC COM port */
194 { "PNP0500", 0 },
195 /* Generic 16550A-compatible COM port */
196 { "PNP0501", 0 },
197 /* Compaq 14400 Modem */
198 { "PNPC000", 0 },
199 /* Compaq 2400/9600 Modem */
200 { "PNPC001", 0 },
201 /* Dial-Up Networking Serial Cable between 2 PCs */
202 { "PNPC031", 0 },
203 /* Dial-Up Networking Parallel Cable between 2 PCs */
204 { "PNPC032", 0 },
205 /* Standard 9600 bps Modem */
206 { "PNPC100", 0 },
207 /* Standard 14400 bps Modem */
208 { "PNPC101", 0 },
209 /* Standard 28800 bps Modem*/
210 { "PNPC102", 0 },
211 /* Standard Modem*/
212 { "PNPC103", 0 },
213 /* Standard 9600 bps Modem*/
214 { "PNPC104", 0 },
215 /* Standard 14400 bps Modem*/
216 { "PNPC105", 0 },
217 /* Standard 28800 bps Modem*/
218 { "PNPC106", 0 },
219 /* Standard Modem */
220 { "PNPC107", 0 },
221 /* Standard 9600 bps Modem */
222 { "PNPC108", 0 },
223 /* Standard 14400 bps Modem */
224 { "PNPC109", 0 },
225 /* Standard 28800 bps Modem */
226 { "PNPC10A", 0 },
227 /* Standard Modem */
228 { "PNPC10B", 0 },
229 /* Standard 9600 bps Modem */
230 { "PNPC10C", 0 },
231 /* Standard 14400 bps Modem */
232 { "PNPC10D", 0 },
233 /* Standard 28800 bps Modem */
234 { "PNPC10E", 0 },
235 /* Standard Modem */
236 { "PNPC10F", 0 },
237 /* Standard PCMCIA Card Modem */
238 { "PNP2000", 0 },
239 /* Rockwell */
240 /* Modular Technology */
241 /* Rockwell 33.6 DPF Internal PnP */
242 /* Modular Technology 33.6 Internal PnP */
243 { "ROK0030", 0 },
244 /* Kortex International */
245 /* KORTEX 14400 Externe PnP */
246 { "ROK0100", 0 },
247 /* Rockwell 28.8 */
248 { "ROK4120", 0 },
249 /* Viking Components, Inc */
250 /* Viking 28.8 INTERNAL Fax+Data+Voice PnP */
251 { "ROK4920", 0 },
252 /* Rockwell */
253 /* British Telecom */
254 /* Modular Technology */
255 /* Rockwell 33.6 DPF External PnP */
256 /* BT Prologue 33.6 External PnP */
257 /* Modular Technology 33.6 External PnP */
258 { "RSS00A0", 0 },
259 /* Viking 56K FAX INT */
260 { "RSS0262", 0 },
261 /* K56 par,VV,Voice,Speakphone,AudioSpan,PnP */
262 { "RSS0250", 0 },
263 /* SupraExpress 28.8 Data/Fax PnP modem */
264 { "SUP1310", 0 },
265 /* SupraExpress 33.6 Data/Fax PnP modem */
266 { "SUP1421", 0 },
267 /* SupraExpress 33.6 Data/Fax PnP modem */
268 { "SUP1590", 0 },
269 /* SupraExpress 336i Sp ASVD */
270 { "SUP1620", 0 },
271 /* SupraExpress 33.6 Data/Fax PnP modem */
272 { "SUP1760", 0 },
273 /* SupraExpress 56i Sp Intl */
274 { "SUP2171", 0 },
275 /* Phoebe Micro */
276 /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */
277 { "TEX0011", 0 },
278 /* Archtek America Corp. */
279 /* Archtek SmartLink Modem 3334BT Plug & Play */
280 { "UAC000F", 0 },
281 /* 3Com Corp. */
282 /* Gateway Telepath IIvi 33.6 */
283 { "USR0000", 0 },
284 /* U.S. Robotics Sporster 33.6K Fax INT PnP */
285 { "USR0002", 0 },
286 /* Sportster Vi 14.4 PnP FAX Voicemail */
287 { "USR0004", 0 },
288 /* U.S. Robotics 33.6K Voice INT PnP */
289 { "USR0006", 0 },
290 /* U.S. Robotics 33.6K Voice EXT PnP */
291 { "USR0007", 0 },
292 /* U.S. Robotics Courier V.Everything INT PnP */
293 { "USR0009", 0 },
294 /* U.S. Robotics 33.6K Voice INT PnP */
295 { "USR2002", 0 },
296 /* U.S. Robotics 56K Voice INT PnP */
297 { "USR2070", 0 },
298 /* U.S. Robotics 56K Voice EXT PnP */
299 { "USR2080", 0 },
300 /* U.S. Robotics 56K FAX INT */
301 { "USR3031", 0 },
302 /* U.S. Robotics 56K FAX INT */
303 { "USR3050", 0 },
304 /* U.S. Robotics 56K Voice INT PnP */
305 { "USR3070", 0 },
306 /* U.S. Robotics 56K Voice EXT PnP */
307 { "USR3080", 0 },
308 /* U.S. Robotics 56K Voice INT PnP */
309 { "USR3090", 0 },
310 /* U.S. Robotics 56K Message */
311 { "USR9100", 0 },
312 /* U.S. Robotics 56K FAX EXT PnP*/
313 { "USR9160", 0 },
314 /* U.S. Robotics 56K FAX INT PnP*/
315 { "USR9170", 0 },
316 /* U.S. Robotics 56K Voice EXT PnP*/
317 { "USR9180", 0 },
318 /* U.S. Robotics 56K Voice INT PnP*/
319 { "USR9190", 0 },
320 /* Wacom tablets */
321 { "WACF004", 0 },
322 { "WACF005", 0 },
323 { "WACF006", 0 },
324 /* Compaq touchscreen */
325 { "FPI2002", 0 },
326 /* Fujitsu Stylistic touchscreens */
327 { "FUJ02B2", 0 },
328 { "FUJ02B3", 0 },
329 /* Fujitsu Stylistic LT touchscreens */
330 { "FUJ02B4", 0 },
331 /* Passive Fujitsu Stylistic touchscreens */
332 { "FUJ02B6", 0 },
333 { "FUJ02B7", 0 },
334 { "FUJ02B8", 0 },
335 { "FUJ02B9", 0 },
336 { "FUJ02BC", 0 },
337 /* Rockwell's (PORALiNK) 33600 INT PNP */
338 { "WCI0003", 0 },
339 /* Unkown PnP modems */
340 { "PNPCXXX", UNKNOWN_DEV },
341 /* More unkown PnP modems */
342 { "PNPDXXX", UNKNOWN_DEV },
343 { "", 0 }
344};
345
346static int rt_16550_pnp_probe(struct pnp_dev *dev,
347 const struct pnp_device_id *dev_id)
348{
349 int i;
350
351 for (i = 0; i < MAX_DEVICES; i++)
352 if (pnp_port_valid(dev, 0) &&
353 pnp_port_start(dev, 0) == io[i]) {
354 if (!irq[i])
355 irq[i] = pnp_irq(dev, 0);
356 return 0;
357 }
358
359 return -ENODEV;
360}
361
362static struct pnp_driver rt_16550_pnp_driver = {
363 .name = RT_16550_DRIVER_NAME,
364 .id_table = rt_16550_pnp_tbl,
365 .probe = rt_16550_pnp_probe,
366};
367
368static int pnp_registered;
369
370static inline void rt_16550_pnp_init(void)
371{
372 if (pnp_register_driver(&rt_16550_pnp_driver) == 0)
373 pnp_registered = 1;
374}
375
376static inline void rt_16550_pnp_cleanup(void)
377{
378 if (pnp_registered)
379 pnp_unregister_driver(&rt_16550_pnp_driver);
380}
381
382#else /* !CONFIG_PNP || !(..._16550A_IO || ..._16550A_ANY) */
383
384#define rt_16550_pnp_init() do { } while (0)
385#define rt_16550_pnp_cleanup() do { } while (0)
386
387#endif /* !CONFIG_PNP || !(..._16550A_IO || ..._16550A_ANY) */