2 * Driver for the Conexant CX23885 PCIe bridge
4 * Copyright (c) 2006 Steven Toth <stoth@linuxtv.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <linux/init.h>
23 #include <linux/module.h>
24 #include <linux/pci.h>
25 #include <linux/delay.h>
26 #include <media/cx25840.h>
27 #include <linux/firmware.h>
28 #include <misc/altera.h>
31 #include "tuner-xc2028.h"
32 #include "netup-eeprom.h"
33 #include "netup-init.h"
34 #include "altera-ci.h"
37 #include "cx23888-ir.h"
39 static unsigned int netup_card_rev
= 4;
40 module_param(netup_card_rev
, int, 0644);
41 MODULE_PARM_DESC(netup_card_rev
,
42 "NetUP Dual DVB-T/C CI card revision");
43 static unsigned int enable_885_ir
;
44 module_param(enable_885_ir
, int, 0644);
45 MODULE_PARM_DESC(enable_885_ir
,
46 "Enable integrated IR controller for supported\n"
47 "\t\t CX2388[57] boards that are wired for it:\n"
48 "\t\t\tHVR-1250 (reported safe)\n"
49 "\t\t\tTerraTec Cinergy T PCIe Dual (not well tested, appears to be safe)\n"
50 "\t\t\tTeVii S470 (reported unsafe)\n"
51 "\t\t This can cause an interrupt storm with some cards.\n"
52 "\t\t Default: 0 [Disabled]");
54 /* ------------------------------------------------------------------ */
55 /* board config info */
57 struct cx23885_board cx23885_boards
[] = {
58 [CX23885_BOARD_UNKNOWN
] = {
59 .name
= "UNKNOWN/GENERIC",
60 /* Ensure safe default for unknown boards */
63 .type
= CX23885_VMUX_COMPOSITE1
,
66 .type
= CX23885_VMUX_COMPOSITE2
,
69 .type
= CX23885_VMUX_COMPOSITE3
,
72 .type
= CX23885_VMUX_COMPOSITE4
,
76 [CX23885_BOARD_HAUPPAUGE_HVR1800lp
] = {
77 .name
= "Hauppauge WinTV-HVR1800lp",
78 .portc
= CX23885_MPEG_DVB
,
80 .type
= CX23885_VMUX_TELEVISION
,
84 .type
= CX23885_VMUX_DEBUG
,
88 .type
= CX23885_VMUX_COMPOSITE1
,
92 .type
= CX23885_VMUX_SVIDEO
,
97 [CX23885_BOARD_HAUPPAUGE_HVR1800
] = {
98 .name
= "Hauppauge WinTV-HVR1800",
99 .porta
= CX23885_ANALOG_VIDEO
,
100 .portb
= CX23885_MPEG_ENCODER
,
101 .portc
= CX23885_MPEG_DVB
,
102 .tuner_type
= TUNER_PHILIPS_TDA8290
,
103 .tuner_addr
= 0x42, /* 0x84 >> 1 */
106 .type
= CX23885_VMUX_TELEVISION
,
107 .vmux
= CX25840_VIN7_CH3
|
110 .amux
= CX25840_AUDIO8
,
113 .type
= CX23885_VMUX_COMPOSITE1
,
114 .vmux
= CX25840_VIN7_CH3
|
117 .amux
= CX25840_AUDIO7
,
120 .type
= CX23885_VMUX_SVIDEO
,
121 .vmux
= CX25840_VIN7_CH3
|
125 .amux
= CX25840_AUDIO7
,
129 [CX23885_BOARD_HAUPPAUGE_HVR1250
] = {
130 .name
= "Hauppauge WinTV-HVR1250",
131 .porta
= CX23885_ANALOG_VIDEO
,
132 .portc
= CX23885_MPEG_DVB
,
133 #ifdef MT2131_NO_ANALOG_SUPPORT_YET
134 .tuner_type
= TUNER_PHILIPS_TDA8290
,
135 .tuner_addr
= 0x42, /* 0x84 >> 1 */
140 #ifdef MT2131_NO_ANALOG_SUPPORT_YET
141 .type
= CX23885_VMUX_TELEVISION
,
142 .vmux
= CX25840_VIN7_CH3
|
145 .amux
= CX25840_AUDIO8
,
149 .type
= CX23885_VMUX_COMPOSITE1
,
150 .vmux
= CX25840_VIN7_CH3
|
153 .amux
= CX25840_AUDIO7
,
156 .type
= CX23885_VMUX_SVIDEO
,
157 .vmux
= CX25840_VIN7_CH3
|
161 .amux
= CX25840_AUDIO7
,
165 [CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
] = {
166 .name
= "DViCO FusionHDTV5 Express",
167 .portb
= CX23885_MPEG_DVB
,
169 [CX23885_BOARD_HAUPPAUGE_HVR1500Q
] = {
170 .name
= "Hauppauge WinTV-HVR1500Q",
171 .portc
= CX23885_MPEG_DVB
,
173 [CX23885_BOARD_HAUPPAUGE_HVR1500
] = {
174 .name
= "Hauppauge WinTV-HVR1500",
175 .porta
= CX23885_ANALOG_VIDEO
,
176 .portc
= CX23885_MPEG_DVB
,
177 .tuner_type
= TUNER_XC2028
,
178 .tuner_addr
= 0x61, /* 0xc2 >> 1 */
180 .type
= CX23885_VMUX_TELEVISION
,
181 .vmux
= CX25840_VIN7_CH3
|
186 .type
= CX23885_VMUX_COMPOSITE1
,
187 .vmux
= CX25840_VIN7_CH3
|
192 .type
= CX23885_VMUX_SVIDEO
,
193 .vmux
= CX25840_VIN7_CH3
|
200 [CX23885_BOARD_HAUPPAUGE_HVR1200
] = {
201 .name
= "Hauppauge WinTV-HVR1200",
202 .portc
= CX23885_MPEG_DVB
,
204 [CX23885_BOARD_HAUPPAUGE_HVR1700
] = {
205 .name
= "Hauppauge WinTV-HVR1700",
206 .portc
= CX23885_MPEG_DVB
,
208 [CX23885_BOARD_HAUPPAUGE_HVR1400
] = {
209 .name
= "Hauppauge WinTV-HVR1400",
210 .portc
= CX23885_MPEG_DVB
,
212 [CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
] = {
213 .name
= "DViCO FusionHDTV7 Dual Express",
214 .portb
= CX23885_MPEG_DVB
,
215 .portc
= CX23885_MPEG_DVB
,
217 [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
] = {
218 .name
= "DViCO FusionHDTV DVB-T Dual Express",
219 .portb
= CX23885_MPEG_DVB
,
220 .portc
= CX23885_MPEG_DVB
,
222 [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
] = {
223 .name
= "Leadtek Winfast PxDVR3200 H",
224 .portc
= CX23885_MPEG_DVB
,
226 [CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
] = {
227 .name
= "Leadtek Winfast PxPVR2200",
228 .porta
= CX23885_ANALOG_VIDEO
,
229 .tuner_type
= TUNER_XC2028
,
233 .type
= CX23885_VMUX_TELEVISION
,
234 .vmux
= CX25840_VIN2_CH1
|
236 .amux
= CX25840_AUDIO8
,
239 .type
= CX23885_VMUX_COMPOSITE1
,
240 .vmux
= CX25840_COMPOSITE1
,
241 .amux
= CX25840_AUDIO7
,
244 .type
= CX23885_VMUX_SVIDEO
,
245 .vmux
= CX25840_SVIDEO_LUMA3
|
246 CX25840_SVIDEO_CHROMA4
,
247 .amux
= CX25840_AUDIO7
,
250 .type
= CX23885_VMUX_COMPONENT
,
251 .vmux
= CX25840_VIN7_CH1
|
254 CX25840_COMPONENT_ON
,
255 .amux
= CX25840_AUDIO7
,
259 [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
] = {
260 .name
= "Leadtek Winfast PxDVR3200 H XC4000",
261 .porta
= CX23885_ANALOG_VIDEO
,
262 .portc
= CX23885_MPEG_DVB
,
263 .tuner_type
= TUNER_XC4000
,
266 .radio_addr
= ADDR_UNSET
,
268 .type
= CX23885_VMUX_TELEVISION
,
269 .vmux
= CX25840_VIN2_CH1
|
273 .type
= CX23885_VMUX_COMPOSITE1
,
274 .vmux
= CX25840_COMPOSITE1
,
276 .type
= CX23885_VMUX_SVIDEO
,
277 .vmux
= CX25840_SVIDEO_LUMA3
|
278 CX25840_SVIDEO_CHROMA4
,
280 .type
= CX23885_VMUX_COMPONENT
,
281 .vmux
= CX25840_VIN7_CH1
|
284 CX25840_COMPONENT_ON
,
287 [CX23885_BOARD_COMPRO_VIDEOMATE_E650F
] = {
288 .name
= "Compro VideoMate E650F",
289 .portc
= CX23885_MPEG_DVB
,
291 [CX23885_BOARD_TBS_6920
] = {
292 .name
= "TurboSight TBS 6920",
293 .portb
= CX23885_MPEG_DVB
,
295 [CX23885_BOARD_TBS_6980
] = {
296 .name
= "TurboSight TBS 6980",
297 .portb
= CX23885_MPEG_DVB
,
298 .portc
= CX23885_MPEG_DVB
,
300 [CX23885_BOARD_TBS_6981
] = {
301 .name
= "TurboSight TBS 6981",
302 .portb
= CX23885_MPEG_DVB
,
303 .portc
= CX23885_MPEG_DVB
,
305 [CX23885_BOARD_TEVII_S470
] = {
306 .name
= "TeVii S470",
307 .portb
= CX23885_MPEG_DVB
,
309 [CX23885_BOARD_DVBWORLD_2005
] = {
310 .name
= "DVBWorld DVB-S2 2005",
311 .portb
= CX23885_MPEG_DVB
,
313 [CX23885_BOARD_NETUP_DUAL_DVBS2_CI
] = {
315 .name
= "NetUP Dual DVB-S2 CI",
316 .portb
= CX23885_MPEG_DVB
,
317 .portc
= CX23885_MPEG_DVB
,
319 [CX23885_BOARD_HAUPPAUGE_HVR1270
] = {
320 .name
= "Hauppauge WinTV-HVR1270",
321 .portc
= CX23885_MPEG_DVB
,
323 [CX23885_BOARD_HAUPPAUGE_HVR1275
] = {
324 .name
= "Hauppauge WinTV-HVR1275",
325 .portc
= CX23885_MPEG_DVB
,
327 [CX23885_BOARD_HAUPPAUGE_HVR1255
] = {
328 .name
= "Hauppauge WinTV-HVR1255",
329 .porta
= CX23885_ANALOG_VIDEO
,
330 .portc
= CX23885_MPEG_DVB
,
331 .tuner_type
= TUNER_ABSENT
,
332 .tuner_addr
= 0x42, /* 0x84 >> 1 */
335 .type
= CX23885_VMUX_TELEVISION
,
336 .vmux
= CX25840_VIN7_CH3
|
340 .amux
= CX25840_AUDIO8
,
342 .type
= CX23885_VMUX_COMPOSITE1
,
343 .vmux
= CX25840_VIN7_CH3
|
346 .amux
= CX25840_AUDIO7
,
348 .type
= CX23885_VMUX_SVIDEO
,
349 .vmux
= CX25840_VIN7_CH3
|
353 .amux
= CX25840_AUDIO7
,
356 [CX23885_BOARD_HAUPPAUGE_HVR1255_22111
] = {
357 .name
= "Hauppauge WinTV-HVR1255",
358 .porta
= CX23885_ANALOG_VIDEO
,
359 .portc
= CX23885_MPEG_DVB
,
360 .tuner_type
= TUNER_ABSENT
,
361 .tuner_addr
= 0x42, /* 0x84 >> 1 */
364 .type
= CX23885_VMUX_TELEVISION
,
365 .vmux
= CX25840_VIN7_CH3
|
369 .amux
= CX25840_AUDIO8
,
371 .type
= CX23885_VMUX_SVIDEO
,
372 .vmux
= CX25840_VIN7_CH3
|
376 .amux
= CX25840_AUDIO7
,
379 [CX23885_BOARD_HAUPPAUGE_HVR1210
] = {
380 .name
= "Hauppauge WinTV-HVR1210",
381 .portc
= CX23885_MPEG_DVB
,
383 [CX23885_BOARD_MYGICA_X8506
] = {
384 .name
= "Mygica X8506 DMB-TH",
385 .tuner_type
= TUNER_XC5000
,
388 .porta
= CX23885_ANALOG_VIDEO
,
389 .portb
= CX23885_MPEG_DVB
,
392 .type
= CX23885_VMUX_TELEVISION
,
393 .vmux
= CX25840_COMPOSITE2
,
396 .type
= CX23885_VMUX_COMPOSITE1
,
397 .vmux
= CX25840_COMPOSITE8
,
400 .type
= CX23885_VMUX_SVIDEO
,
401 .vmux
= CX25840_SVIDEO_LUMA3
|
402 CX25840_SVIDEO_CHROMA4
,
405 .type
= CX23885_VMUX_COMPONENT
,
406 .vmux
= CX25840_COMPONENT_ON
|
413 [CX23885_BOARD_MAGICPRO_PROHDTVE2
] = {
414 .name
= "Magic-Pro ProHDTV Extreme 2",
415 .tuner_type
= TUNER_XC5000
,
418 .porta
= CX23885_ANALOG_VIDEO
,
419 .portb
= CX23885_MPEG_DVB
,
422 .type
= CX23885_VMUX_TELEVISION
,
423 .vmux
= CX25840_COMPOSITE2
,
426 .type
= CX23885_VMUX_COMPOSITE1
,
427 .vmux
= CX25840_COMPOSITE8
,
430 .type
= CX23885_VMUX_SVIDEO
,
431 .vmux
= CX25840_SVIDEO_LUMA3
|
432 CX25840_SVIDEO_CHROMA4
,
435 .type
= CX23885_VMUX_COMPONENT
,
436 .vmux
= CX25840_COMPONENT_ON
|
443 [CX23885_BOARD_HAUPPAUGE_HVR1850
] = {
444 .name
= "Hauppauge WinTV-HVR1850",
445 .porta
= CX23885_ANALOG_VIDEO
,
446 .portb
= CX23885_MPEG_ENCODER
,
447 .portc
= CX23885_MPEG_DVB
,
448 .tuner_type
= TUNER_ABSENT
,
449 .tuner_addr
= 0x42, /* 0x84 >> 1 */
452 .type
= CX23885_VMUX_TELEVISION
,
453 .vmux
= CX25840_VIN7_CH3
|
457 .amux
= CX25840_AUDIO8
,
459 .type
= CX23885_VMUX_COMPOSITE1
,
460 .vmux
= CX25840_VIN7_CH3
|
463 .amux
= CX25840_AUDIO7
,
465 .type
= CX23885_VMUX_SVIDEO
,
466 .vmux
= CX25840_VIN7_CH3
|
470 .amux
= CX25840_AUDIO7
,
473 [CX23885_BOARD_COMPRO_VIDEOMATE_E800
] = {
474 .name
= "Compro VideoMate E800",
475 .portc
= CX23885_MPEG_DVB
,
477 [CX23885_BOARD_HAUPPAUGE_HVR1290
] = {
478 .name
= "Hauppauge WinTV-HVR1290",
479 .portc
= CX23885_MPEG_DVB
,
481 [CX23885_BOARD_MYGICA_X8558PRO
] = {
482 .name
= "Mygica X8558 PRO DMB-TH",
483 .portb
= CX23885_MPEG_DVB
,
484 .portc
= CX23885_MPEG_DVB
,
486 [CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
] = {
487 .name
= "LEADTEK WinFast PxTV1200",
488 .porta
= CX23885_ANALOG_VIDEO
,
489 .tuner_type
= TUNER_XC2028
,
493 .type
= CX23885_VMUX_TELEVISION
,
494 .vmux
= CX25840_VIN2_CH1
|
498 .type
= CX23885_VMUX_COMPOSITE1
,
499 .vmux
= CX25840_COMPOSITE1
,
501 .type
= CX23885_VMUX_SVIDEO
,
502 .vmux
= CX25840_SVIDEO_LUMA3
|
503 CX25840_SVIDEO_CHROMA4
,
505 .type
= CX23885_VMUX_COMPONENT
,
506 .vmux
= CX25840_VIN7_CH1
|
509 CX25840_COMPONENT_ON
,
512 [CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
] = {
513 .name
= "GoTView X5 3D Hybrid",
514 .tuner_type
= TUNER_XC5000
,
517 .porta
= CX23885_ANALOG_VIDEO
,
518 .portb
= CX23885_MPEG_DVB
,
520 .type
= CX23885_VMUX_TELEVISION
,
521 .vmux
= CX25840_VIN2_CH1
|
525 .type
= CX23885_VMUX_COMPOSITE1
,
526 .vmux
= CX23885_VMUX_COMPOSITE1
,
528 .type
= CX23885_VMUX_SVIDEO
,
529 .vmux
= CX25840_SVIDEO_LUMA3
|
530 CX25840_SVIDEO_CHROMA4
,
533 [CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
] = {
535 .name
= "NetUP Dual DVB-T/C-CI RF",
536 .porta
= CX23885_ANALOG_VIDEO
,
537 .portb
= CX23885_MPEG_DVB
,
538 .portc
= CX23885_MPEG_DVB
,
541 .tuner_type
= TUNER_XC5000
,
544 .type
= CX23885_VMUX_TELEVISION
,
545 .vmux
= CX25840_COMPOSITE1
,
548 [CX23885_BOARD_MPX885
] = {
550 .porta
= CX23885_ANALOG_VIDEO
,
552 .type
= CX23885_VMUX_COMPOSITE1
,
553 .vmux
= CX25840_COMPOSITE1
,
554 .amux
= CX25840_AUDIO6
,
557 .type
= CX23885_VMUX_COMPOSITE2
,
558 .vmux
= CX25840_COMPOSITE2
,
559 .amux
= CX25840_AUDIO6
,
562 .type
= CX23885_VMUX_COMPOSITE3
,
563 .vmux
= CX25840_COMPOSITE3
,
564 .amux
= CX25840_AUDIO7
,
567 .type
= CX23885_VMUX_COMPOSITE4
,
568 .vmux
= CX25840_COMPOSITE4
,
569 .amux
= CX25840_AUDIO7
,
573 [CX23885_BOARD_MYGICA_X8507
] = {
574 .name
= "Mygica X8502/X8507 ISDB-T",
575 .tuner_type
= TUNER_XC5000
,
578 .porta
= CX23885_ANALOG_VIDEO
,
579 .portb
= CX23885_MPEG_DVB
,
582 .type
= CX23885_VMUX_TELEVISION
,
583 .vmux
= CX25840_COMPOSITE2
,
584 .amux
= CX25840_AUDIO8
,
587 .type
= CX23885_VMUX_COMPOSITE1
,
588 .vmux
= CX25840_COMPOSITE8
,
589 .amux
= CX25840_AUDIO7
,
592 .type
= CX23885_VMUX_SVIDEO
,
593 .vmux
= CX25840_SVIDEO_LUMA3
|
594 CX25840_SVIDEO_CHROMA4
,
595 .amux
= CX25840_AUDIO7
,
598 .type
= CX23885_VMUX_COMPONENT
,
599 .vmux
= CX25840_COMPONENT_ON
|
603 .amux
= CX25840_AUDIO7
,
607 [CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
] = {
608 .name
= "TerraTec Cinergy T PCIe Dual",
609 .portb
= CX23885_MPEG_DVB
,
610 .portc
= CX23885_MPEG_DVB
,
612 [CX23885_BOARD_TEVII_S471
] = {
613 .name
= "TeVii S471",
614 .portb
= CX23885_MPEG_DVB
,
616 [CX23885_BOARD_PROF_8000
] = {
617 .name
= "Prof Revolution DVB-S2 8000",
618 .portb
= CX23885_MPEG_DVB
,
620 [CX23885_BOARD_HAUPPAUGE_HVR4400
] = {
621 .name
= "Hauppauge WinTV-HVR4400",
622 .portb
= CX23885_MPEG_DVB
,
624 [CX23885_BOARD_AVERMEDIA_HC81R
] = {
625 .name
= "AVerTV Hybrid Express Slim HC81R",
626 .tuner_type
= TUNER_XC2028
,
627 .tuner_addr
= 0x61, /* 0xc2 >> 1 */
629 .porta
= CX23885_ANALOG_VIDEO
,
631 .type
= CX23885_VMUX_TELEVISION
,
632 .vmux
= CX25840_VIN2_CH1
|
636 .amux
= CX25840_AUDIO8
,
638 .type
= CX23885_VMUX_SVIDEO
,
639 .vmux
= CX25840_VIN8_CH1
|
643 .amux
= CX25840_AUDIO6
,
645 .type
= CX23885_VMUX_COMPONENT
,
646 .vmux
= CX25840_VIN1_CH1
|
650 .amux
= CX25840_AUDIO6
,
654 const unsigned int cx23885_bcount
= ARRAY_SIZE(cx23885_boards
);
656 /* ------------------------------------------------------------------ */
657 /* PCI subsystem IDs */
659 struct cx23885_subid cx23885_subids
[] = {
663 .card
= CX23885_BOARD_UNKNOWN
,
667 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800lp
,
671 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
675 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
679 .card
= CX23885_BOARD_HAUPPAUGE_HVR1800
,
683 .card
= CX23885_BOARD_HAUPPAUGE_HVR1250
,
687 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
,
691 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500Q
,
695 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500Q
,
699 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500
,
703 .card
= CX23885_BOARD_HAUPPAUGE_HVR1500
,
707 .card
= CX23885_BOARD_HAUPPAUGE_HVR1200
,
711 .card
= CX23885_BOARD_HAUPPAUGE_HVR1200
,
715 .card
= CX23885_BOARD_HAUPPAUGE_HVR1700
,
719 .card
= CX23885_BOARD_HAUPPAUGE_HVR1400
,
723 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
,
727 .card
= CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
,
731 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
,
735 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
,
739 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
,
743 .card
= CX23885_BOARD_COMPRO_VIDEOMATE_E650F
,
747 .card
= CX23885_BOARD_TBS_6920
,
751 .card
= CX23885_BOARD_TBS_6980
,
755 .card
= CX23885_BOARD_TBS_6981
,
759 .card
= CX23885_BOARD_TEVII_S470
,
763 .card
= CX23885_BOARD_DVBWORLD_2005
,
767 .card
= CX23885_BOARD_NETUP_DUAL_DVBS2_CI
,
771 .card
= CX23885_BOARD_HAUPPAUGE_HVR1270
,
775 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
779 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
783 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255
,
787 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255_22111
,
791 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
795 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
799 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
803 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
807 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
811 .card
= CX23885_BOARD_HAUPPAUGE_HVR1255
,
815 .card
= CX23885_BOARD_HAUPPAUGE_HVR1275
,
819 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
823 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
,
827 .card
= CX23885_BOARD_HAUPPAUGE_HVR1210
, /* HVR1215 */
831 .card
= CX23885_BOARD_MYGICA_X8506
,
835 .card
= CX23885_BOARD_MAGICPRO_PROHDTVE2
,
839 .card
= CX23885_BOARD_HAUPPAUGE_HVR1850
,
843 .card
= CX23885_BOARD_COMPRO_VIDEOMATE_E800
,
847 .card
= CX23885_BOARD_HAUPPAUGE_HVR1290
,
851 .card
= CX23885_BOARD_MYGICA_X8558PRO
,
855 .card
= CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
,
859 .card
= CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
,
863 .card
= CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
,
867 .card
= CX23885_BOARD_MYGICA_X8507
,
871 .card
= CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
,
875 .card
= CX23885_BOARD_TEVII_S471
,
879 .card
= CX23885_BOARD_PROF_8000
,
883 .card
= CX23885_BOARD_HAUPPAUGE_HVR4400
,
887 .card
= CX23885_BOARD_HAUPPAUGE_HVR4400
,
891 .card
= CX23885_BOARD_HAUPPAUGE_HVR4400
,
895 .card
= CX23885_BOARD_HAUPPAUGE_HVR4400
,
899 .card
= CX23885_BOARD_AVERMEDIA_HC81R
,
902 const unsigned int cx23885_idcount
= ARRAY_SIZE(cx23885_subids
);
904 void cx23885_card_list(struct cx23885_dev
*dev
)
908 if (0 == dev
->pci
->subsystem_vendor
&&
909 0 == dev
->pci
->subsystem_device
) {
911 "%s: Board has no valid PCIe Subsystem ID and can't\n"
912 "%s: be autodetected. Pass card=<n> insmod option\n"
913 "%s: to workaround that. Redirect complaints to the\n"
914 "%s: vendor of the TV card. Best regards,\n"
916 dev
->name
, dev
->name
, dev
->name
, dev
->name
, dev
->name
);
919 "%s: Your board isn't known (yet) to the driver.\n"
920 "%s: Try to pick one of the existing card configs via\n"
921 "%s: card=<n> insmod option. Updating to the latest\n"
922 "%s: version might help as well.\n",
923 dev
->name
, dev
->name
, dev
->name
, dev
->name
);
925 printk(KERN_INFO
"%s: Here is a list of valid choices for the card=<n> insmod option:\n",
927 for (i
= 0; i
< cx23885_bcount
; i
++)
928 printk(KERN_INFO
"%s: card=%d -> %s\n",
929 dev
->name
, i
, cx23885_boards
[i
].name
);
932 static void hauppauge_eeprom(struct cx23885_dev
*dev
, u8
*eeprom_data
)
936 tveeprom_hauppauge_analog(&dev
->i2c_bus
[0].i2c_client
, &tv
,
939 /* Make sure we support the board model */
942 /* WinTV-HVR1270 (PCIe, Retail, half height)
943 * ATSC/QAM and basic analog, IR Blast */
945 /* WinTV-HVR1210 (PCIe, Retail, half height)
946 * DVB-T and basic analog, IR Blast */
948 /* WinTV-HVR1270 (PCIe, Retail, half height)
949 * ATSC/QAM and basic analog, IR Recv */
951 /* WinTV-HVR1210 (PCIe, Retail, half height)
952 * DVB-T and basic analog, IR Recv */
954 /* WinTV-HVR1275 (PCIe, Retail, half height)
955 * ATSC/QAM and basic analog, IR Recv */
957 /* WinTV-HVR1210 (PCIe, Retail, half height)
958 * DVB-T and basic analog, IR Recv */
960 /* WinTV-HVR1270 (PCIe, Retail, full height)
961 * ATSC/QAM and basic analog, IR Blast */
963 /* WinTV-HVR1210 (PCIe, Retail, full height)
964 * DVB-T and basic analog, IR Blast */
966 /* WinTV-HVR1270 (PCIe, Retail, full height)
967 * ATSC/QAM and basic analog, IR Recv */
969 /* WinTV-HVR1210 (PCIe, Retail, full height)
970 * DVB-T and basic analog, IR Recv */
972 /* WinTV-HVR1275 (PCIe, Retail, full height)
973 * ATSC/QAM and basic analog, IR Recv */
975 /* WinTV-HVR1210 (PCIe, Retail, full height)
976 * DVB-T and basic analog, IR Recv */
978 /* WinTV-HVR1200 (PCIe, Retail, full height)
979 * DVB-T and basic analog */
981 /* WinTV-HVR1200 (PCIe, OEM, half height)
982 * DVB-T and basic analog */
984 /* WinTV-HVR1200 (PCIe, OEM, half height)
985 * DVB-T and basic analog */
987 /* WinTV-HVR1200 (PCIe, OEM, full height)
988 * DVB-T and basic analog */
990 /* WinTV-HVR1200 (PCIe, OEM, half height)
991 * DVB-T and basic analog */
993 /* WinTV-HVR1200 (PCIe, OEM, full height)
994 * DVB-T and basic analog */
996 /* WinTV-HVR1200 (PCIe, OEM, full height)
997 * DVB-T and basic analog */
999 /* WinTV-HVR1200 (PCIe, OEM, half height)
1000 * DVB-T and basic analog */
1002 /* WinTV-HVR1200 (PCIe, OEM, full height)
1003 * DVB-T and basic analog */
1005 /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual
1006 channel ATSC and MPEG2 HW Encoder */
1008 /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC
1011 /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC
1014 /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM
1017 /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM
1020 /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM,
1021 Dual channel ATSC and MPEG2 HW Encoder */
1023 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM,
1024 Dual channel ATSC and MPEG2 HW Encoder */
1026 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM,
1027 Dual channel ATSC and MPEG2 HW Encoder */
1029 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM,
1030 Dual channel ATSC and MPEG2 HW Encoder */
1032 /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM,
1033 Dual channel ATSC and MPEG2 HW Encoder */
1035 /* WinTV-HVR1250 (PCIe, Retail, IR, full height,
1036 ATSC and Basic analog */
1038 /* WinTV-HVR1250 (PCIe, Retail, IR, half height,
1039 ATSC and Basic analog */
1041 /* WinTV-HVR1250 (PCIe, No IR, half height,
1042 ATSC [at least] and Basic analog) */
1044 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height,
1045 ATSC and Basic analog */
1047 /* WinTV-HVR1250 (PCIe, OEM, No IR, full height,
1048 ATSC and Basic analog */
1050 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height,
1051 ATSC and Basic analog */
1053 /* WinTV-HVR1400 (Express Card, Retail, IR,
1054 * DVB-T and Basic analog */
1056 /* WinTV-HVR1700 (PCIe, OEM, No IR, half height)
1057 * DVB-T and MPEG2 HW Encoder */
1059 /* WinTV-HVR1700 (PCIe, OEM, No IR, full height)
1060 * DVB-T and MPEG2 HW Encoder */
1063 /* WinTV-HVR1850 (PCIe, Retail, 3.5mm in, IR, FM,
1064 Dual channel ATSC and MPEG2 HW Encoder */
1067 /* WinTV-HVR1290 (PCIe, OEM, RCA in, IR,
1068 Dual channel ATSC and Basic analog */
1071 printk(KERN_WARNING
"%s: warning: "
1072 "unknown hauppauge model #%d\n",
1073 dev
->name
, tv
.model
);
1077 printk(KERN_INFO
"%s: hauppauge eeprom: model=%d\n",
1078 dev
->name
, tv
.model
);
1081 /* Some TBS cards require initing a chip using a bitbanged SPI attached
1082 to the cx23885 gpio's. If this chip doesn't get init'ed the demod
1083 doesn't respond to any command. */
1084 static void tbs_card_init(struct cx23885_dev
*dev
)
1088 0xe0, 0x06, 0x66, 0x33, 0x65,
1089 0x01, 0x17, 0x06, 0xde};
1091 switch (dev
->board
) {
1092 case CX23885_BOARD_TBS_6980
:
1093 case CX23885_BOARD_TBS_6981
:
1094 cx_set(GP0_IO
, 0x00070007);
1095 usleep_range(1000, 10000);
1096 cx_clear(GP0_IO
, 2);
1097 usleep_range(1000, 10000);
1098 for (i
= 0; i
< 9 * 8; i
++) {
1099 cx_clear(GP0_IO
, 7);
1100 usleep_range(1000, 10000);
1102 ((buf
[i
>> 3] >> (7 - (i
& 7))) & 1) | 4);
1103 usleep_range(1000, 10000);
1110 int cx23885_tuner_callback(void *priv
, int component
, int command
, int arg
)
1112 struct cx23885_tsport
*port
= priv
;
1113 struct cx23885_dev
*dev
= port
->dev
;
1116 if ((command
== XC2028_RESET_CLK
) || (command
== XC2028_I2C_FLUSH
))
1120 printk(KERN_ERR
"%s(): Unknown command 0x%x.\n",
1125 switch (dev
->board
) {
1126 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1127 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1128 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1129 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
1130 case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
:
1131 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
:
1132 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
1133 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
1134 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
1135 /* Tuner Reset Command */
1138 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
1139 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
1140 /* Two identical tuners on two different i2c buses,
1141 * we need to reset the correct gpio. */
1144 else if (port
->nr
== 2)
1147 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1148 /* Tuner Reset Command */
1151 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1152 altera_ci_tuner_reset(dev
, port
->nr
);
1154 case CX23885_BOARD_AVERMEDIA_HC81R
:
1155 /* XC3028L Reset Command */
1161 /* Drive the tuner into reset and back out */
1162 cx_clear(GP0_IO
, bitmask
);
1164 cx_set(GP0_IO
, bitmask
);
1170 void cx23885_gpio_setup(struct cx23885_dev
*dev
)
1172 switch (dev
->board
) {
1173 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1174 /* GPIO-0 cx24227 demodulator reset */
1175 cx_set(GP0_IO
, 0x00010001); /* Bring the part out of reset */
1177 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1178 /* GPIO-0 cx24227 demodulator */
1179 /* GPIO-2 xc3028 tuner */
1181 /* Put the parts into reset */
1182 cx_set(GP0_IO
, 0x00050000);
1183 cx_clear(GP0_IO
, 0x00000005);
1186 /* Bring the parts out of reset */
1187 cx_set(GP0_IO
, 0x00050005);
1189 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1190 /* GPIO-0 cx24227 demodulator reset */
1191 /* GPIO-2 xc5000 tuner reset */
1192 cx_set(GP0_IO
, 0x00050005); /* Bring the part out of reset */
1194 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1195 /* GPIO-0 656_CLK */
1197 /* GPIO-2 8295A Reset */
1198 /* GPIO-3-10 cx23417 data0-7 */
1199 /* GPIO-11-14 cx23417 addr0-3 */
1200 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
1203 /* CX23417 GPIO's */
1204 /* EIO15 Zilog Reset */
1205 /* EIO14 S5H1409/CX24227 Reset */
1206 mc417_gpio_enable(dev
, GPIO_15
| GPIO_14
, 1);
1208 /* Put the demod into reset and protect the eeprom */
1209 mc417_gpio_clear(dev
, GPIO_15
| GPIO_14
);
1212 /* Bring the demod and blaster out of reset */
1213 mc417_gpio_set(dev
, GPIO_15
| GPIO_14
);
1216 /* Force the TDA8295A into reset and back */
1217 cx23885_gpio_enable(dev
, GPIO_2
, 1);
1218 cx23885_gpio_set(dev
, GPIO_2
);
1220 cx23885_gpio_clear(dev
, GPIO_2
);
1222 cx23885_gpio_set(dev
, GPIO_2
);
1225 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1226 /* GPIO-0 tda10048 demodulator reset */
1227 /* GPIO-2 tda18271 tuner reset */
1229 /* Put the parts into reset and back */
1230 cx_set(GP0_IO
, 0x00050000);
1232 cx_clear(GP0_IO
, 0x00000005);
1234 cx_set(GP0_IO
, 0x00050005);
1236 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
1237 /* GPIO-0 TDA10048 demodulator reset */
1238 /* GPIO-2 TDA8295A Reset */
1239 /* GPIO-3-10 cx23417 data0-7 */
1240 /* GPIO-11-14 cx23417 addr0-3 */
1241 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
1243 /* The following GPIO's are on the interna AVCore (cx25840) */
1245 /* GPIO-20 IR_TX 416/DVBT Select */
1246 /* GPIO-21 IIS DAT */
1247 /* GPIO-22 IIS WCLK */
1248 /* GPIO-23 IIS BCLK */
1250 /* Put the parts into reset and back */
1251 cx_set(GP0_IO
, 0x00050000);
1253 cx_clear(GP0_IO
, 0x00000005);
1255 cx_set(GP0_IO
, 0x00050005);
1257 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1258 /* GPIO-0 Dibcom7000p demodulator reset */
1259 /* GPIO-2 xc3028L tuner reset */
1262 /* Put the parts into reset and back */
1263 cx_set(GP0_IO
, 0x00050000);
1265 cx_clear(GP0_IO
, 0x00000005);
1267 cx_set(GP0_IO
, 0x00050005);
1269 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
1270 /* GPIO-0 xc5000 tuner reset i2c bus 0 */
1271 /* GPIO-1 s5h1409 demod reset i2c bus 0 */
1272 /* GPIO-2 xc5000 tuner reset i2c bus 1 */
1273 /* GPIO-3 s5h1409 demod reset i2c bus 0 */
1275 /* Put the parts into reset and back */
1276 cx_set(GP0_IO
, 0x000f0000);
1278 cx_clear(GP0_IO
, 0x0000000f);
1280 cx_set(GP0_IO
, 0x000f000f);
1282 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
1283 /* GPIO-0 portb xc3028 reset */
1284 /* GPIO-1 portb zl10353 reset */
1285 /* GPIO-2 portc xc3028 reset */
1286 /* GPIO-3 portc zl10353 reset */
1288 /* Put the parts into reset and back */
1289 cx_set(GP0_IO
, 0x000f0000);
1291 cx_clear(GP0_IO
, 0x0000000f);
1293 cx_set(GP0_IO
, 0x000f000f);
1295 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
1296 case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
:
1297 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
:
1298 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
1299 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
1300 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
1301 /* GPIO-2 xc3028 tuner reset */
1303 /* The following GPIO's are on the internal AVCore (cx25840) */
1304 /* GPIO-? zl10353 demod reset */
1306 /* Put the parts into reset and back */
1307 cx_set(GP0_IO
, 0x00040000);
1309 cx_clear(GP0_IO
, 0x00000004);
1311 cx_set(GP0_IO
, 0x00040004);
1313 case CX23885_BOARD_TBS_6920
:
1314 case CX23885_BOARD_TBS_6980
:
1315 case CX23885_BOARD_TBS_6981
:
1316 case CX23885_BOARD_PROF_8000
:
1317 cx_write(MC417_CTL
, 0x00000036);
1318 cx_write(MC417_OEN
, 0x00001000);
1319 cx_set(MC417_RWD
, 0x00000002);
1321 cx_clear(MC417_RWD
, 0x00000800);
1323 cx_set(MC417_RWD
, 0x00000800);
1326 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
1327 /* GPIO-0 INTA from CiMax1
1328 GPIO-1 INTB from CiMax2
1330 GPIO-3 to GPIO-10 data/addr for CA
1331 GPIO-11 ~CS0 to CiMax1
1332 GPIO-12 ~CS1 to CiMax2
1333 GPIO-13 ADL0 load LSB addr
1334 GPIO-14 ADL1 load MSB addr
1335 GPIO-15 ~RDY from CiMax
1336 GPIO-17 ~RD to CiMax
1337 GPIO-18 ~WR to CiMax
1339 cx_set(GP0_IO
, 0x00040000); /* GPIO as out */
1340 /* GPIO1 and GPIO2 as INTA and INTB from CiMaxes, reset low */
1341 cx_clear(GP0_IO
, 0x00030004);
1342 mdelay(100);/* reset delay */
1343 cx_set(GP0_IO
, 0x00040004); /* GPIO as out, reset high */
1344 cx_write(MC417_CTL
, 0x00000037);/* enable GPIO3-18 pins */
1345 /* GPIO-15 IN as ~ACK, rest as OUT */
1346 cx_write(MC417_OEN
, 0x00001000);
1347 /* ~RD, ~WR high; ADL0, ADL1 low; ~CS0, ~CS1 high */
1348 cx_write(MC417_RWD
, 0x0000c300);
1350 cx_write(GPIO_ISM
, 0x00000000);/* INTERRUPTS active low*/
1352 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1353 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1354 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1355 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
1356 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1357 /* GPIO-5 RF Control: 0 = RF1 Terrestrial, 1 = RF2 Cable */
1358 /* GPIO-6 I2C Gate which can isolate the demod from the bus */
1359 /* GPIO-9 Demod reset */
1361 /* Put the parts into reset and back */
1362 cx23885_gpio_enable(dev
, GPIO_9
| GPIO_6
| GPIO_5
, 1);
1363 cx23885_gpio_set(dev
, GPIO_9
| GPIO_6
| GPIO_5
);
1364 cx23885_gpio_clear(dev
, GPIO_9
);
1366 cx23885_gpio_set(dev
, GPIO_9
);
1368 case CX23885_BOARD_MYGICA_X8506
:
1369 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
1370 case CX23885_BOARD_MYGICA_X8507
:
1371 /* GPIO-0 (0)Analog / (1)Digital TV */
1372 /* GPIO-1 reset XC5000 */
1373 /* GPIO-2 demod reset */
1374 cx23885_gpio_enable(dev
, GPIO_0
| GPIO_1
| GPIO_2
, 1);
1375 cx23885_gpio_clear(dev
, GPIO_1
| GPIO_2
);
1377 cx23885_gpio_set(dev
, GPIO_0
| GPIO_1
| GPIO_2
);
1380 case CX23885_BOARD_MYGICA_X8558PRO
:
1381 /* GPIO-0 reset first ATBM8830 */
1382 /* GPIO-1 reset second ATBM8830 */
1383 cx23885_gpio_enable(dev
, GPIO_0
| GPIO_1
, 1);
1384 cx23885_gpio_clear(dev
, GPIO_0
| GPIO_1
);
1386 cx23885_gpio_set(dev
, GPIO_0
| GPIO_1
);
1389 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1390 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1391 /* GPIO-0 656_CLK */
1394 /* GPIO-3-10 cx23417 data0-7 */
1395 /* GPIO-11-14 cx23417 addr0-3 */
1396 /* GPIO-15-18 cx23417 READY, CS, RD, WR */
1398 /* GPIO-20 C_IR_TX */
1399 /* GPIO-21 I2S DAT */
1400 /* GPIO-22 I2S WCLK */
1401 /* GPIO-23 I2S BCLK */
1402 /* ALT GPIO: EXP GPIO LATCH */
1404 /* CX23417 GPIO's */
1405 /* GPIO-14 S5H1411/CX24228 Reset */
1406 /* GPIO-13 EEPROM write protect */
1407 mc417_gpio_enable(dev
, GPIO_14
| GPIO_13
, 1);
1409 /* Put the demod into reset and protect the eeprom */
1410 mc417_gpio_clear(dev
, GPIO_14
| GPIO_13
);
1413 /* Bring the demod out of reset */
1414 mc417_gpio_set(dev
, GPIO_14
);
1418 /* Connected to IF / Mux */
1420 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1421 cx_set(GP0_IO
, 0x00010001); /* Bring the part out of reset */
1423 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1426 GPIO-2 ~reset chips out
1427 GPIO-3 to GPIO-10 data/addr for CA in/out
1437 cx_set(GP0_IO
, 0x00060000); /* GPIO-1,2 as out */
1438 /* GPIO-0 as INT, reset & TMS low */
1439 cx_clear(GP0_IO
, 0x00010006);
1440 mdelay(100);/* reset delay */
1441 cx_set(GP0_IO
, 0x00000004); /* reset high */
1442 cx_write(MC417_CTL
, 0x00000037);/* enable GPIO-3..18 pins */
1443 /* GPIO-17 is TDO in, GPIO-15 is ~RDY in, rest is out */
1444 cx_write(MC417_OEN
, 0x00005000);
1445 /* ~RD, ~WR high; ADDR low; ~CS high */
1446 cx_write(MC417_RWD
, 0x00000d00);
1448 cx_write(GPIO_ISM
, 0x00000000);/* INTERRUPTS active low*/
1450 case CX23885_BOARD_HAUPPAUGE_HVR4400
:
1451 /* GPIO-8 tda10071 demod reset */
1453 /* Put the parts into reset and back */
1454 cx23885_gpio_enable(dev
, GPIO_8
, 1);
1455 cx23885_gpio_clear(dev
, GPIO_8
);
1457 cx23885_gpio_set(dev
, GPIO_8
);
1460 case CX23885_BOARD_AVERMEDIA_HC81R
:
1461 cx_clear(MC417_CTL
, 1);
1462 /* GPIO-0,1,2 setup direction as output */
1463 cx_set(GP0_IO
, 0x00070000);
1465 /* AF9013 demod reset */
1466 cx_set(GP0_IO
, 0x00010001);
1468 cx_clear(GP0_IO
, 0x00010001);
1470 cx_set(GP0_IO
, 0x00010001);
1473 cx_clear(GP0_IO
, 0x00030003);
1475 cx_set(GP0_IO
, 0x00020002);
1477 cx_set(GP0_IO
, 0x00010001);
1479 cx_clear(GP0_IO
, 0x00020002);
1480 /* XC3028L tuner reset */
1481 cx_set(GP0_IO
, 0x00040004);
1482 cx_clear(GP0_IO
, 0x00040004);
1483 cx_set(GP0_IO
, 0x00040004);
1489 int cx23885_ir_init(struct cx23885_dev
*dev
)
1491 static struct v4l2_subdev_io_pin_config ir_rxtx_pin_cfg
[] = {
1493 .flags
= V4L2_SUBDEV_IO_PIN_INPUT
,
1494 .pin
= CX23885_PIN_IR_RX_GPIO19
,
1495 .function
= CX23885_PAD_IR_RX
,
1497 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1499 .flags
= V4L2_SUBDEV_IO_PIN_OUTPUT
,
1500 .pin
= CX23885_PIN_IR_TX_GPIO20
,
1501 .function
= CX23885_PAD_IR_TX
,
1503 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1506 const size_t ir_rxtx_pin_cfg_count
= ARRAY_SIZE(ir_rxtx_pin_cfg
);
1508 static struct v4l2_subdev_io_pin_config ir_rx_pin_cfg
[] = {
1510 .flags
= V4L2_SUBDEV_IO_PIN_INPUT
,
1511 .pin
= CX23885_PIN_IR_RX_GPIO19
,
1512 .function
= CX23885_PAD_IR_RX
,
1514 .strength
= CX25840_PIN_DRIVE_MEDIUM
,
1517 const size_t ir_rx_pin_cfg_count
= ARRAY_SIZE(ir_rx_pin_cfg
);
1519 struct v4l2_subdev_ir_parameters params
;
1521 switch (dev
->board
) {
1522 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1523 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1524 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1525 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1526 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1527 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1528 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1529 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
1530 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1531 /* FIXME: Implement me */
1533 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1534 ret
= cx23888_ir_probe(dev
);
1537 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_888_IR
);
1538 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1539 ir_rx_pin_cfg_count
, ir_rx_pin_cfg
);
1541 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1542 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1543 ret
= cx23888_ir_probe(dev
);
1546 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_888_IR
);
1547 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1548 ir_rxtx_pin_cfg_count
, ir_rxtx_pin_cfg
);
1550 * For these boards we need to invert the Tx output via the
1551 * IR controller to have the LED off while idle
1553 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_g_parameters
, ¶ms
);
1554 params
.enable
= false;
1555 params
.shutdown
= false;
1556 params
.invert_level
= true;
1557 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_s_parameters
, ¶ms
);
1558 params
.shutdown
= true;
1559 v4l2_subdev_call(dev
->sd_ir
, ir
, tx_s_parameters
, ¶ms
);
1561 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
1562 case CX23885_BOARD_TEVII_S470
:
1563 case CX23885_BOARD_MYGICA_X8507
:
1564 case CX23885_BOARD_TBS_6980
:
1565 case CX23885_BOARD_TBS_6981
:
1568 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_AV_CORE
);
1569 if (dev
->sd_ir
== NULL
) {
1573 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1574 ir_rx_pin_cfg_count
, ir_rx_pin_cfg
);
1576 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1579 dev
->sd_ir
= cx23885_find_hw(dev
, CX23885_HW_AV_CORE
);
1580 if (dev
->sd_ir
== NULL
) {
1584 v4l2_subdev_call(dev
->sd_cx25840
, core
, s_io_pin_config
,
1585 ir_rxtx_pin_cfg_count
, ir_rxtx_pin_cfg
);
1587 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
1588 request_module("ir-kbd-i2c");
1595 void cx23885_ir_fini(struct cx23885_dev
*dev
)
1597 switch (dev
->board
) {
1598 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1599 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1600 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1601 cx23885_irq_remove(dev
, PCI_MSK_IR
);
1602 cx23888_ir_remove(dev
);
1605 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
1606 case CX23885_BOARD_TEVII_S470
:
1607 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1608 case CX23885_BOARD_MYGICA_X8507
:
1609 case CX23885_BOARD_TBS_6980
:
1610 case CX23885_BOARD_TBS_6981
:
1611 cx23885_irq_remove(dev
, PCI_MSK_AV_CORE
);
1612 /* sd_ir is a duplicate pointer to the AV Core, just clear it */
1618 static int netup_jtag_io(void *device
, int tms
, int tdi
, int read_tdo
)
1622 struct cx23885_dev
*dev
= (struct cx23885_dev
*)device
;
1624 data
= ((cx_read(GP0_IO
)) & (~0x00000002));
1625 data
|= (tms
? 0x00020002 : 0x00020000);
1626 cx_write(GP0_IO
, data
);
1629 data
= ((cx_read(MC417_RWD
)) & (~0x0000a000));
1630 data
|= (tdi
? 0x00008000 : 0);
1631 cx_write(MC417_RWD
, data
);
1633 tdo
= (data
& 0x00004000) ? 1 : 0; /*TDO*/
1635 cx_write(MC417_RWD
, data
| 0x00002000);
1638 cx_write(MC417_RWD
, data
);
1643 void cx23885_ir_pci_int_enable(struct cx23885_dev
*dev
)
1645 switch (dev
->board
) {
1646 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1647 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1648 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1650 cx23885_irq_add_enable(dev
, PCI_MSK_IR
);
1652 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
1653 case CX23885_BOARD_TEVII_S470
:
1654 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1655 case CX23885_BOARD_MYGICA_X8507
:
1656 case CX23885_BOARD_TBS_6980
:
1657 case CX23885_BOARD_TBS_6981
:
1659 cx23885_irq_add_enable(dev
, PCI_MSK_AV_CORE
);
1664 void cx23885_card_setup(struct cx23885_dev
*dev
)
1666 struct cx23885_tsport
*ts1
= &dev
->ts1
;
1667 struct cx23885_tsport
*ts2
= &dev
->ts2
;
1669 static u8 eeprom
[256];
1671 if (dev
->i2c_bus
[0].i2c_rc
== 0) {
1672 dev
->i2c_bus
[0].i2c_client
.addr
= 0xa0 >> 1;
1673 tveeprom_read(&dev
->i2c_bus
[0].i2c_client
,
1674 eeprom
, sizeof(eeprom
));
1677 switch (dev
->board
) {
1678 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1679 if (dev
->i2c_bus
[0].i2c_rc
== 0) {
1680 if (eeprom
[0x80] != 0x84)
1681 hauppauge_eeprom(dev
, eeprom
+0xc0);
1683 hauppauge_eeprom(dev
, eeprom
+0x80);
1686 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1687 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1688 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1689 if (dev
->i2c_bus
[0].i2c_rc
== 0)
1690 hauppauge_eeprom(dev
, eeprom
+0x80);
1692 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1693 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
1694 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1695 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
1696 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1697 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1698 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1699 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
1700 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1701 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1702 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1703 case CX23885_BOARD_HAUPPAUGE_HVR4400
:
1704 if (dev
->i2c_bus
[0].i2c_rc
== 0)
1705 hauppauge_eeprom(dev
, eeprom
+0xc0);
1709 switch (dev
->board
) {
1710 case CX23885_BOARD_AVERMEDIA_HC81R
:
1711 /* Defaults for VID B */
1712 ts1
->gen_ctrl_val
= 0x4; /* Parallel */
1713 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1714 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1715 /* Defaults for VID C */
1716 /* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */
1717 ts2
->gen_ctrl_val
= 0x10e;
1718 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1719 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1721 case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP
:
1722 case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP
:
1723 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1724 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1725 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1726 /* break omitted intentionally */
1727 case CX23885_BOARD_DVICO_FUSIONHDTV_5_EXP
:
1728 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1729 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1730 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1732 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1733 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1734 /* Defaults for VID B - Analog encoder */
1735 /* DREQ_POL, SMODE, PUNC_CLK, MCLK_POL Serial bus + punc clk */
1736 ts1
->gen_ctrl_val
= 0x10e;
1737 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1738 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1740 /* APB_TSVALERR_POL (active low)*/
1741 ts1
->vld_misc_val
= 0x2000;
1742 ts1
->hw_sop_ctrl_val
= (0x47 << 16 | 188 << 4 | 0xc);
1743 cx_write(0x130184, 0xc);
1745 /* Defaults for VID C */
1746 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1747 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1748 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1750 case CX23885_BOARD_TBS_6920
:
1751 ts1
->gen_ctrl_val
= 0x4; /* Parallel */
1752 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1753 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1755 case CX23885_BOARD_TEVII_S470
:
1756 case CX23885_BOARD_TEVII_S471
:
1757 case CX23885_BOARD_DVBWORLD_2005
:
1758 case CX23885_BOARD_PROF_8000
:
1759 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
1760 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1761 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1763 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
1764 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1765 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
1766 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1767 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1768 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1769 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1770 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1771 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1773 case CX23885_BOARD_TBS_6980
:
1774 case CX23885_BOARD_TBS_6981
:
1775 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1776 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1777 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1778 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1779 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1780 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1783 case CX23885_BOARD_MYGICA_X8506
:
1784 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
1785 case CX23885_BOARD_MYGICA_X8507
:
1786 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
1787 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1788 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1790 case CX23885_BOARD_MYGICA_X8558PRO
:
1791 ts1
->gen_ctrl_val
= 0x5; /* Parallel */
1792 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1793 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1794 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1795 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1796 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1798 case CX23885_BOARD_HAUPPAUGE_HVR4400
:
1799 ts1
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1800 ts1
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1801 ts1
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1803 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1804 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1805 case CX23885_BOARD_HAUPPAUGE_HVR1500Q
:
1806 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
1807 case CX23885_BOARD_HAUPPAUGE_HVR1200
:
1808 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
1809 case CX23885_BOARD_HAUPPAUGE_HVR1400
:
1810 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
1811 case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
:
1812 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
:
1813 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
1814 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1815 case CX23885_BOARD_HAUPPAUGE_HVR1275
:
1816 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1817 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
1818 case CX23885_BOARD_HAUPPAUGE_HVR1210
:
1819 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
1820 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1821 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1823 ts2
->gen_ctrl_val
= 0xc; /* Serial bus + punctured clock */
1824 ts2
->ts_clk_en_val
= 0x1; /* Enable TS_CLK */
1825 ts2
->src_sel_val
= CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO
;
1828 /* Certain boards support analog, or require the avcore to be
1829 * loaded, ensure this happens.
1831 switch (dev
->board
) {
1832 case CX23885_BOARD_TEVII_S470
:
1833 /* Currently only enabled for the integrated IR controller */
1836 case CX23885_BOARD_HAUPPAUGE_HVR1250
:
1837 case CX23885_BOARD_HAUPPAUGE_HVR1800
:
1838 case CX23885_BOARD_HAUPPAUGE_HVR1800lp
:
1839 case CX23885_BOARD_HAUPPAUGE_HVR1700
:
1840 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H
:
1841 case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200
:
1842 case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000
:
1843 case CX23885_BOARD_COMPRO_VIDEOMATE_E650F
:
1844 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
1845 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
:
1846 case CX23885_BOARD_COMPRO_VIDEOMATE_E800
:
1847 case CX23885_BOARD_HAUPPAUGE_HVR1255
:
1848 case CX23885_BOARD_HAUPPAUGE_HVR1255_22111
:
1849 case CX23885_BOARD_HAUPPAUGE_HVR1270
:
1850 case CX23885_BOARD_HAUPPAUGE_HVR1850
:
1851 case CX23885_BOARD_MYGICA_X8506
:
1852 case CX23885_BOARD_MAGICPRO_PROHDTVE2
:
1853 case CX23885_BOARD_HAUPPAUGE_HVR1290
:
1854 case CX23885_BOARD_LEADTEK_WINFAST_PXTV1200
:
1855 case CX23885_BOARD_GOTVIEW_X5_3D_HYBRID
:
1856 case CX23885_BOARD_HAUPPAUGE_HVR1500
:
1857 case CX23885_BOARD_MPX885
:
1858 case CX23885_BOARD_MYGICA_X8507
:
1859 case CX23885_BOARD_TERRATEC_CINERGY_T_PCIE_DUAL
:
1860 case CX23885_BOARD_AVERMEDIA_HC81R
:
1861 case CX23885_BOARD_TBS_6980
:
1862 case CX23885_BOARD_TBS_6981
:
1863 dev
->sd_cx25840
= v4l2_i2c_new_subdev(&dev
->v4l2_dev
,
1864 &dev
->i2c_bus
[2].i2c_adap
,
1865 "cx25840", 0x88 >> 1, NULL
);
1866 if (dev
->sd_cx25840
) {
1867 dev
->sd_cx25840
->grp_id
= CX23885_HW_AV_CORE
;
1868 v4l2_subdev_call(dev
->sd_cx25840
, core
, load_fw
);
1873 /* AUX-PLL 27MHz CLK */
1874 switch (dev
->board
) {
1875 case CX23885_BOARD_NETUP_DUAL_DVBS2_CI
:
1876 netup_initialize(dev
);
1878 case CX23885_BOARD_NETUP_DUAL_DVB_T_C_CI_RF
: {
1880 const struct firmware
*fw
;
1881 const char *filename
= "dvb-netup-altera-01.fw";
1882 char *action
= "configure";
1883 static struct netup_card_info cinfo
;
1884 struct altera_config netup_config
= {
1887 .jtag_io
= netup_jtag_io
,
1890 netup_initialize(dev
);
1892 netup_get_card_info(&dev
->i2c_bus
[0].i2c_adap
, &cinfo
);
1894 cinfo
.rev
= netup_card_rev
;
1896 switch (cinfo
.rev
) {
1898 filename
= "dvb-netup-altera-04.fw";
1901 filename
= "dvb-netup-altera-01.fw";
1904 printk(KERN_INFO
"NetUP card rev=0x%x fw_filename=%s\n",
1905 cinfo
.rev
, filename
);
1907 ret
= request_firmware(&fw
, filename
, &dev
->pci
->dev
);
1909 printk(KERN_ERR
"did not find the firmware file. (%s) "
1910 "Please see linux/Documentation/dvb/ for more details "
1911 "on firmware-problems.", filename
);
1913 altera_init(&netup_config
, fw
);
1915 release_firmware(fw
);
1921 /* ------------------------------------------------------------------ */