mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
fix port number detection on revision 1 FSM cards
This commit is contained in:
parent
60426304db
commit
0dd4f106ab
@ -2662,10 +2662,6 @@ static void ddb_ports_init(struct ddb *dev)
|
|||||||
if (!rm)
|
if (!rm)
|
||||||
continue;
|
continue;
|
||||||
ports = info->port_num;
|
ports = info->port_num;
|
||||||
if ((l == 0) && (info->type == DDB_MOD) &&
|
|
||||||
(dev->link[0].ids.revision == 1)) {
|
|
||||||
ports = ddbreadl(dev, 0x260) >> 24;
|
|
||||||
}
|
|
||||||
for (i = 0; i < ports; i++, p++) {
|
for (i = 0; i < ports; i++, p++) {
|
||||||
port = &dev->port[p];
|
port = &dev->port[p];
|
||||||
port->dev = dev;
|
port->dev = dev;
|
||||||
@ -4445,6 +4441,41 @@ static int ddb_init_boards(struct ddb *dev)
|
|||||||
(link->ids.revision == 1)))
|
(link->ids.revision == 1)))
|
||||||
mci_init(link);
|
mci_init(link);
|
||||||
}
|
}
|
||||||
|
if (l)
|
||||||
|
continue;
|
||||||
|
if (dev->link[0].info->type == DDB_MOD &&
|
||||||
|
dev->link[0].info->version == 2) {
|
||||||
|
u32 lic = ddbreadl(dev, 0x1c) & 7;
|
||||||
|
|
||||||
|
if (dev->link[0].ids.revision == 1)
|
||||||
|
lic = ddbreadl(dev, 0x260) >> 24;
|
||||||
|
|
||||||
|
switch (lic) {
|
||||||
|
case 0:
|
||||||
|
case 4:
|
||||||
|
dev->link[0].info =
|
||||||
|
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0000);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
case 8:
|
||||||
|
dev->link[0].info =
|
||||||
|
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0003);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
case 24:
|
||||||
|
dev->link[0].info =
|
||||||
|
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0001);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
case 16:
|
||||||
|
dev->link[0].info =
|
||||||
|
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0002);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
dev_info(dev->dev, "Modulator channels: %u\n", dev->link[0].info->port_num);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -570,6 +570,17 @@ static const struct ddb_info ddb_mod_fsm_4 = {
|
|||||||
.lostlock_irq = 9,
|
.lostlock_irq = 9,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct ddb_info ddb_mod_fsm = {
|
||||||
|
.type = DDB_MOD,
|
||||||
|
.name = "Digital Devices DVB-C FSM",
|
||||||
|
.version = 2,
|
||||||
|
.regmap = &octopus_mod_2_map,
|
||||||
|
.port_num = 0,
|
||||||
|
.temp_num = 1,
|
||||||
|
.tempmon_irq = 8,
|
||||||
|
.lostlock_irq = 9,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct ddb_info ddb_sdr_atv = {
|
static const struct ddb_info ddb_sdr_atv = {
|
||||||
.type = DDB_MOD,
|
.type = DDB_MOD,
|
||||||
.name = "Digital Devices SDR ATV",
|
.name = "Digital Devices SDR ATV",
|
||||||
@ -873,6 +884,7 @@ static const struct ddb_device_id ddb_device_ids[] = {
|
|||||||
DDB_DEVID(0x0201, 0x0002, ddb_mod),
|
DDB_DEVID(0x0201, 0x0002, ddb_mod),
|
||||||
DDB_DEVID(0x0201, 0x0004, ddb_mod_4), /* dummy entry ! */
|
DDB_DEVID(0x0201, 0x0004, ddb_mod_4), /* dummy entry ! */
|
||||||
DDB_DEVID(0x0203, 0x0001, ddb_mod),
|
DDB_DEVID(0x0203, 0x0001, ddb_mod),
|
||||||
|
DDB_DEVID(0x0210, 0x0004, ddb_mod_fsm), /* dummy entry ! */
|
||||||
DDB_DEVID(0x0210, 0x0000, ddb_mod_fsm_4), /* dummy entry ! */
|
DDB_DEVID(0x0210, 0x0000, ddb_mod_fsm_4), /* dummy entry ! */
|
||||||
DDB_DEVID(0x0210, 0x0001, ddb_mod_fsm_24),
|
DDB_DEVID(0x0210, 0x0001, ddb_mod_fsm_24),
|
||||||
DDB_DEVID(0x0210, 0x0002, ddb_mod_fsm_16),
|
DDB_DEVID(0x0210, 0x0002, ddb_mod_fsm_16),
|
||||||
|
@ -357,38 +357,11 @@ static int __devinit ddb_probe(struct pci_dev *pdev,
|
|||||||
get_ddb_info(0xdd01, 0x0201, 0xdd01, 0x0004);
|
get_ddb_info(0xdd01, 0x0201, 0xdd01, 0x0004);
|
||||||
}
|
}
|
||||||
if (dev->link[0].info->type == DDB_MOD &&
|
if (dev->link[0].info->type == DDB_MOD &&
|
||||||
dev->link[0].info->version == 2) {
|
dev->link[0].info->version == 2)
|
||||||
u32 lic = ddbreadl(dev, 0x1c) & 7;
|
dev->link[0].info =
|
||||||
|
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0004);
|
||||||
|
|
||||||
if (dev->link[0].ids.revision == 1)
|
dev_info(dev->dev, "%s\n", dev->link[0].info->name);
|
||||||
lic = ddbreadl(dev, 0x260) >> 24;
|
|
||||||
|
|
||||||
switch (lic) {
|
|
||||||
case 0:
|
|
||||||
case 4:
|
|
||||||
dev->link[0].info =
|
|
||||||
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0000);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
case 8:
|
|
||||||
dev->link[0].info =
|
|
||||||
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0003);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
case 24:
|
|
||||||
dev->link[0].info =
|
|
||||||
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0001);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
case 16:
|
|
||||||
dev->link[0].info =
|
|
||||||
get_ddb_info(0xdd01, 0x0210, 0xdd01, 0x0002);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dev_info(dev->dev, "device name: %s\n", dev->link[0].info->name);
|
|
||||||
dev_info(dev->dev, "HW %08x REGMAP %08x FW %u.%u\n",
|
dev_info(dev->dev, "HW %08x REGMAP %08x FW %u.%u\n",
|
||||||
dev->link[0].ids.hwid, dev->link[0].ids.regmapid,
|
dev->link[0].ids.hwid, dev->link[0].ids.regmapid,
|
||||||
(dev->link[0].ids.hwid & 0xff0000) >> 16,
|
(dev->link[0].ids.hwid & 0xff0000) >> 16,
|
||||||
|
Loading…
Reference in New Issue
Block a user