bttv-cards.c (8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17) bttv-cards.c (3c161e82dfbd3ee67a1548691412d04d04ad6a37)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3
4 bttv-cards.c
5
6 this file has configuration information - card-specific stuff
7 like the big tvcards array for the most part
8

--- 67 unchanged lines hidden (view full) ---

76static void identify_by_eeprom(struct bttv *btv,
77 unsigned char eeprom_data[256]);
78static int pvr_boot(struct bttv *btv);
79
80/* config variables */
81static unsigned int triton1;
82static unsigned int vsfx;
83static unsigned int latency = UNSET;
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3
4 bttv-cards.c
5
6 this file has configuration information - card-specific stuff
7 like the big tvcards array for the most part
8

--- 67 unchanged lines hidden (view full) ---

76static void identify_by_eeprom(struct bttv *btv,
77 unsigned char eeprom_data[256]);
78static int pvr_boot(struct bttv *btv);
79
80/* config variables */
81static unsigned int triton1;
82static unsigned int vsfx;
83static unsigned int latency = UNSET;
84int no_overlay=-1;
85
86static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
87static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
88static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
89static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
90static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
91static unsigned int audiodev[BTTV_MAX];
92static unsigned int saa6588[BTTV_MAX];
93static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
94static unsigned int autoload = UNSET;
95static unsigned int gpiomask = UNSET;
96static unsigned int audioall = UNSET;
97static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
98
99/* insmod options */
100module_param(triton1, int, 0444);
101module_param(vsfx, int, 0444);
84
85static unsigned int card[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
86static unsigned int pll[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
87static unsigned int tuner[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
88static unsigned int svhs[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
89static unsigned int remote[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = UNSET };
90static unsigned int audiodev[BTTV_MAX];
91static unsigned int saa6588[BTTV_MAX];
92static struct bttv *master[BTTV_MAX] = { [ 0 ... (BTTV_MAX-1) ] = NULL };
93static unsigned int autoload = UNSET;
94static unsigned int gpiomask = UNSET;
95static unsigned int audioall = UNSET;
96static unsigned int audiomux[5] = { [ 0 ... 4 ] = UNSET };
97
98/* insmod options */
99module_param(triton1, int, 0444);
100module_param(vsfx, int, 0444);
102module_param(no_overlay, int, 0444);
103module_param(latency, int, 0444);
104module_param(gpiomask, int, 0444);
105module_param(audioall, int, 0444);
106module_param(autoload, int, 0444);
107
108module_param_array(card, int, NULL, 0444);
109module_param_array(pll, int, NULL, 0444);
110module_param_array(tuner, int, NULL, 0444);

--- 11 unchanged lines hidden (view full) ---

122MODULE_PARM_DESC(autoload, "obsolete option, please do not use anymore");
123MODULE_PARM_DESC(audiodev, "specify audio device:\n"
124 "\t\t-1 = no audio\n"
125 "\t\t 0 = autodetect (default)\n"
126 "\t\t 1 = msp3400\n"
127 "\t\t 2 = tda7432\n"
128 "\t\t 3 = tvaudio");
129MODULE_PARM_DESC(saa6588, "if 1, then load the saa6588 RDS module, default (0) is to use the card definition.");
101module_param(latency, int, 0444);
102module_param(gpiomask, int, 0444);
103module_param(audioall, int, 0444);
104module_param(autoload, int, 0444);
105
106module_param_array(card, int, NULL, 0444);
107module_param_array(pll, int, NULL, 0444);
108module_param_array(tuner, int, NULL, 0444);

--- 11 unchanged lines hidden (view full) ---

120MODULE_PARM_DESC(autoload, "obsolete option, please do not use anymore");
121MODULE_PARM_DESC(audiodev, "specify audio device:\n"
122 "\t\t-1 = no audio\n"
123 "\t\t 0 = autodetect (default)\n"
124 "\t\t 1 = msp3400\n"
125 "\t\t 2 = tda7432\n"
126 "\t\t 3 = tvaudio");
127MODULE_PARM_DESC(saa6588, "if 1, then load the saa6588 RDS module, default (0) is to use the card definition.");
130MODULE_PARM_DESC(no_overlay, "allow override overlay default (0 disables, 1 enables) [some VIA/SIS chipsets are known to have problem with overlay]");
131
132
133/* I2C addresses list */
134#define I2C_ADDR_TDA7432 0x8a
135#define I2C_ADDR_MSP3400 0x80
136#define I2C_ADDR_MSP3400_ALT 0x88
137
138

--- 4725 unchanged lines hidden (view full) ---

4864 master[btv->c.nr+3] = btv;
4865}
4866
4867/* ----------------------------------------------------------------------- */
4868/* motherboard chipset specific stuff */
4869
4870void __init bttv_check_chipset(void)
4871{
128
129
130/* I2C addresses list */
131#define I2C_ADDR_TDA7432 0x8a
132#define I2C_ADDR_MSP3400 0x80
133#define I2C_ADDR_MSP3400_ALT 0x88
134
135

--- 4725 unchanged lines hidden (view full) ---

4861 master[btv->c.nr+3] = btv;
4862}
4863
4864/* ----------------------------------------------------------------------- */
4865/* motherboard chipset specific stuff */
4866
4867void __init bttv_check_chipset(void)
4868{
4872 int pcipci_fail = 0;
4873 struct pci_dev *dev = NULL;
4874
4869 struct pci_dev *dev = NULL;
4870
4875 if (pci_pci_problems & (PCIPCI_FAIL|PCIAGP_FAIL)) /* should check if target is AGP */
4876 pcipci_fail = 1;
4877 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4878 triton1 = 1;
4879 if (pci_pci_problems & PCIPCI_VSFX)
4880 vsfx = 1;
4881#ifdef PCIPCI_ALIMAGIK
4882 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4883 latency = 0x0A;
4884#endif
4885
4886
4887 /* print warnings about any quirks found */
4888 if (triton1)
4889 pr_info("Host bridge needs ETBF enabled\n");
4890 if (vsfx)
4891 pr_info("Host bridge needs VSFX enabled\n");
4871 if (pci_pci_problems & (PCIPCI_TRITON|PCIPCI_NATOMA|PCIPCI_VIAETBF))
4872 triton1 = 1;
4873 if (pci_pci_problems & PCIPCI_VSFX)
4874 vsfx = 1;
4875#ifdef PCIPCI_ALIMAGIK
4876 if (pci_pci_problems & PCIPCI_ALIMAGIK)
4877 latency = 0x0A;
4878#endif
4879
4880
4881 /* print warnings about any quirks found */
4882 if (triton1)
4883 pr_info("Host bridge needs ETBF enabled\n");
4884 if (vsfx)
4885 pr_info("Host bridge needs VSFX enabled\n");
4892 if (pcipci_fail) {
4893 pr_info("bttv and your chipset may not work together\n");
4894 if (!no_overlay) {
4895 pr_info("overlay will be disabled\n");
4896 no_overlay = 1;
4897 } else {
4898 pr_info("overlay forced. Use this option at your own risk.\n");
4899 }
4900 }
4901 if (UNSET != latency)
4902 pr_info("pci latency fixup [%d]\n", latency);
4903 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
4904 PCI_DEVICE_ID_INTEL_82441, dev))) {
4905 unsigned char b;
4906 pci_read_config_byte(dev, 0x53, &b);
4907 if (bttv_debug)
4908 pr_info("Host bridge: 82441FX Natoma, bufcon=0x%02x\n",

--- 39 unchanged lines hidden ---
4886 if (UNSET != latency)
4887 pr_info("pci latency fixup [%d]\n", latency);
4888 while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
4889 PCI_DEVICE_ID_INTEL_82441, dev))) {
4890 unsigned char b;
4891 pci_read_config_byte(dev, 0x53, &b);
4892 if (bttv_debug)
4893 pr_info("Host bridge: 82441FX Natoma, bufcon=0x%02x\n",

--- 39 unchanged lines hidden ---