mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
convert all device information structs to const and fix related problems
This commit is contained in:
parent
3e67af1b5b
commit
fe5f6b737c
@ -1920,7 +1920,7 @@ static void ddb_port_probe(struct ddb_port *port)
|
|||||||
port->class = DDB_PORT_MOD;
|
port->class = DDB_PORT_MOD;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
if (dev->link[l].info->type == DDB_OCTOPRO_HDIN) {
|
if (dev->link[l].info->type == DDB_OCTOPRO_HDIN) {
|
||||||
if (port->nr == 0) {
|
if (port->nr == 0) {
|
||||||
dev->link[l].info->type = DDB_OCTOPUS;
|
dev->link[l].info->type = DDB_OCTOPUS;
|
||||||
@ -1929,7 +1929,7 @@ static void ddb_port_probe(struct ddb_port *port)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (dev->link[l].info->type == DDB_OCTOPUS_MAX) {
|
if (dev->link[l].info->type == DDB_OCTOPUS_MAX) {
|
||||||
port->name = "DUAL DVB-S2 MAX";
|
port->name = "DUAL DVB-S2 MAX";
|
||||||
port->type_name = "MXL5XX";
|
port->type_name = "MXL5XX";
|
||||||
@ -2296,9 +2296,9 @@ static void output_handler(unsigned long data)
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
|
static const struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
|
||||||
{
|
{
|
||||||
struct ddb_info *info;
|
const struct ddb_info *info;
|
||||||
|
|
||||||
if (link)
|
if (link)
|
||||||
info = io->port->dev->link[io->port->lnr].info;
|
info = io->port->dev->link[io->port->lnr].info;
|
||||||
@ -2312,7 +2312,7 @@ static struct ddb_regmap *io_regmap(struct ddb_io *io, int link)
|
|||||||
static void ddb_dma_init(struct ddb_io *io, int nr, int out)
|
static void ddb_dma_init(struct ddb_io *io, int nr, int out)
|
||||||
{
|
{
|
||||||
struct ddb_dma *dma;
|
struct ddb_dma *dma;
|
||||||
struct ddb_regmap *rm = io_regmap(io, 0);
|
const struct ddb_regmap *rm = io_regmap(io, 0);
|
||||||
|
|
||||||
dma = out ? &io->port->dev->odma[nr] : &io->port->dev->idma[nr];
|
dma = out ? &io->port->dev->odma[nr] : &io->port->dev->idma[nr];
|
||||||
io->dma = dma;
|
io->dma = dma;
|
||||||
@ -2353,7 +2353,7 @@ static void ddb_input_init(struct ddb_port *port, int nr, int pnr, int anr)
|
|||||||
{
|
{
|
||||||
struct ddb *dev = port->dev;
|
struct ddb *dev = port->dev;
|
||||||
struct ddb_input *input = &dev->input[anr];
|
struct ddb_input *input = &dev->input[anr];
|
||||||
struct ddb_regmap *rm;
|
const struct ddb_regmap *rm;
|
||||||
|
|
||||||
port->input[pnr] = input;
|
port->input[pnr] = input;
|
||||||
input->nr = nr;
|
input->nr = nr;
|
||||||
@ -2364,7 +2364,7 @@ static void ddb_input_init(struct ddb_port *port, int nr, int pnr, int anr)
|
|||||||
dev_info(dev->dev, "init link %u, input %u, regs %08x\n",
|
dev_info(dev->dev, "init link %u, input %u, regs %08x\n",
|
||||||
port->lnr, nr, input->regs);
|
port->lnr, nr, input->regs);
|
||||||
if (dev->has_dma) {
|
if (dev->has_dma) {
|
||||||
struct ddb_regmap *rm0 = io_regmap(input, 0);
|
const struct ddb_regmap *rm0 = io_regmap(input, 0);
|
||||||
u32 base = rm0->irq_base_idma;
|
u32 base = rm0->irq_base_idma;
|
||||||
u32 dma_nr = nr;
|
u32 dma_nr = nr;
|
||||||
|
|
||||||
@ -2383,7 +2383,7 @@ static void ddb_output_init(struct ddb_port *port, int nr)
|
|||||||
{
|
{
|
||||||
struct ddb *dev = port->dev;
|
struct ddb *dev = port->dev;
|
||||||
struct ddb_output *output = &dev->output[nr];
|
struct ddb_output *output = &dev->output[nr];
|
||||||
struct ddb_regmap *rm;
|
const struct ddb_regmap *rm;
|
||||||
|
|
||||||
port->output = output;
|
port->output = output;
|
||||||
output->nr = nr;
|
output->nr = nr;
|
||||||
@ -2394,7 +2394,7 @@ static void ddb_output_init(struct ddb_port *port, int nr)
|
|||||||
dev_info(dev->dev, "init link %u, output %u, regs %08x\n",
|
dev_info(dev->dev, "init link %u, output %u, regs %08x\n",
|
||||||
port->lnr, nr, output->regs);
|
port->lnr, nr, output->regs);
|
||||||
if (dev->has_dma) {
|
if (dev->has_dma) {
|
||||||
struct ddb_regmap *rm0 = io_regmap(output, 0);
|
const struct ddb_regmap *rm0 = io_regmap(output, 0);
|
||||||
u32 base = rm0->irq_base_odma;
|
u32 base = rm0->irq_base_odma;
|
||||||
|
|
||||||
dev->handler[0][nr + base] = output_handler;
|
dev->handler[0][nr + base] = output_handler;
|
||||||
@ -2436,8 +2436,8 @@ static void ddb_ports_init(struct ddb *dev)
|
|||||||
{
|
{
|
||||||
u32 i, l, p;
|
u32 i, l, p;
|
||||||
struct ddb_port *port;
|
struct ddb_port *port;
|
||||||
struct ddb_info *info;
|
const struct ddb_info *info;
|
||||||
struct ddb_regmap *rm;
|
const struct ddb_regmap *rm;
|
||||||
|
|
||||||
for (p = l = 0; l < DDB_MAX_LINK; l++) {
|
for (p = l = 0; l < DDB_MAX_LINK; l++) {
|
||||||
info = dev->link[l].info;
|
info = dev->link[l].info;
|
||||||
@ -4289,7 +4289,7 @@ static int tempmon_init(struct ddb_link *link, int first_time)
|
|||||||
|
|
||||||
static int ddb_init_tempmon(struct ddb_link *link)
|
static int ddb_init_tempmon(struct ddb_link *link)
|
||||||
{
|
{
|
||||||
struct ddb_info *info = link->info;
|
const struct ddb_info *info = link->info;
|
||||||
|
|
||||||
if (!info->tempmon_irq)
|
if (!info->tempmon_irq)
|
||||||
return 0;
|
return 0;
|
||||||
@ -4307,7 +4307,7 @@ static int ddb_init_tempmon(struct ddb_link *link)
|
|||||||
|
|
||||||
static int ddb_init_boards(struct ddb *dev)
|
static int ddb_init_boards(struct ddb *dev)
|
||||||
{
|
{
|
||||||
struct ddb_info *info;
|
const struct ddb_info *info;
|
||||||
struct ddb_link *link;
|
struct ddb_link *link;
|
||||||
u32 l;
|
u32 l;
|
||||||
|
|
||||||
@ -4404,7 +4404,7 @@ static void ddb_reset_io(struct ddb *dev, u32 reg)
|
|||||||
void ddb_reset_ios(struct ddb *dev)
|
void ddb_reset_ios(struct ddb *dev)
|
||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
struct ddb_regmap *rm = dev->link[0].info->regmap;
|
const struct ddb_regmap *rm = dev->link[0].info->regmap;
|
||||||
|
|
||||||
if (rm->input)
|
if (rm->input)
|
||||||
for (i = 0; i < rm->input->num; i++)
|
for (i = 0; i < rm->input->num; i++)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* ddbridge.c: Digital Devices PCIe bridge driver
|
* ddbridge-hw.c: Digital Devices device information tables
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010-2017 Digital Devices GmbH
|
* Copyright (C) 2010-2017 Digital Devices GmbH
|
||||||
* Ralph Metzler <rjkm@metzlerbros.de>
|
* Ralph Metzler <rjkm@metzlerbros.de>
|
||||||
@ -28,19 +28,19 @@
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_regset octopus_mod_odma = {
|
static const struct ddb_regset octopus_mod_odma = {
|
||||||
.base = 0x300,
|
.base = 0x300,
|
||||||
.num = 0x0a,
|
.num = 0x0a,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_mod_odma_buf = {
|
static const struct ddb_regset octopus_mod_odma_buf = {
|
||||||
.base = 0x2000,
|
.base = 0x2000,
|
||||||
.num = 0x0a,
|
.num = 0x0a,
|
||||||
.size = 0x100,
|
.size = 0x100,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_mod_channel = {
|
static const struct ddb_regset octopus_mod_channel = {
|
||||||
.base = 0x400,
|
.base = 0x400,
|
||||||
.num = 0x0a,
|
.num = 0x0a,
|
||||||
.size = 0x40,
|
.size = 0x40,
|
||||||
@ -48,25 +48,25 @@ static struct ddb_regset octopus_mod_channel = {
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_regset octopus_mod_2_odma = {
|
static const struct ddb_regset octopus_mod_2_odma = {
|
||||||
.base = 0x400,
|
.base = 0x400,
|
||||||
.num = 0x18,
|
.num = 0x18,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_mod_2_odma_buf = {
|
static const struct ddb_regset octopus_mod_2_odma_buf = {
|
||||||
.base = 0x8000,
|
.base = 0x8000,
|
||||||
.num = 0x18,
|
.num = 0x18,
|
||||||
.size = 0x100,
|
.size = 0x100,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_mod_2_channel = {
|
static const struct ddb_regset octopus_mod_2_channel = {
|
||||||
.base = 0x800,
|
.base = 0x800,
|
||||||
.num = 0x18,
|
.num = 0x18,
|
||||||
.size = 0x40,
|
.size = 0x40,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_sdr_output = {
|
static const struct ddb_regset octopus_sdr_output = {
|
||||||
.base = 0x240,
|
.base = 0x240,
|
||||||
.num = 0x14,
|
.num = 0x14,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
@ -74,49 +74,49 @@ static struct ddb_regset octopus_sdr_output = {
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_regset octopus_input = {
|
static const struct ddb_regset octopus_input = {
|
||||||
.base = 0x200,
|
.base = 0x200,
|
||||||
.num = 0x08,
|
.num = 0x08,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_output = {
|
static const struct ddb_regset octopus_output = {
|
||||||
.base = 0x280,
|
.base = 0x280,
|
||||||
.num = 0x08,
|
.num = 0x08,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_idma = {
|
static const struct ddb_regset octopus_idma = {
|
||||||
.base = 0x300,
|
.base = 0x300,
|
||||||
.num = 0x08,
|
.num = 0x08,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_idma_buf = {
|
static const struct ddb_regset octopus_idma_buf = {
|
||||||
.base = 0x2000,
|
.base = 0x2000,
|
||||||
.num = 0x08,
|
.num = 0x08,
|
||||||
.size = 0x100,
|
.size = 0x100,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_odma = {
|
static const struct ddb_regset octopus_odma = {
|
||||||
.base = 0x380,
|
.base = 0x380,
|
||||||
.num = 0x04,
|
.num = 0x04,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_odma_buf = {
|
static const struct ddb_regset octopus_odma_buf = {
|
||||||
.base = 0x2800,
|
.base = 0x2800,
|
||||||
.num = 0x04,
|
.num = 0x04,
|
||||||
.size = 0x100,
|
.size = 0x100,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_i2c = {
|
static const struct ddb_regset octopus_i2c = {
|
||||||
.base = 0x80,
|
.base = 0x80,
|
||||||
.num = 0x04,
|
.num = 0x04,
|
||||||
.size = 0x20,
|
.size = 0x20,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_i2c_buf = {
|
static const struct ddb_regset octopus_i2c_buf = {
|
||||||
.base = 0x1000,
|
.base = 0x1000,
|
||||||
.num = 0x04,
|
.num = 0x04,
|
||||||
.size = 0x200,
|
.size = 0x200,
|
||||||
@ -124,55 +124,55 @@ static struct ddb_regset octopus_i2c_buf = {
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_regset octopro_input = {
|
static const struct ddb_regset octopro_input = {
|
||||||
.base = 0x400,
|
.base = 0x400,
|
||||||
.num = 0x14,
|
.num = 0x14,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopro_output = {
|
static const struct ddb_regset octopro_output = {
|
||||||
.base = 0x600,
|
.base = 0x600,
|
||||||
.num = 0x0a,
|
.num = 0x0a,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopro_idma = {
|
static const struct ddb_regset octopro_idma = {
|
||||||
.base = 0x800,
|
.base = 0x800,
|
||||||
.num = 0x40,
|
.num = 0x40,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopro_idma_buf = {
|
static const struct ddb_regset octopro_idma_buf = {
|
||||||
.base = 0x4000,
|
.base = 0x4000,
|
||||||
.num = 0x40,
|
.num = 0x40,
|
||||||
.size = 0x100,
|
.size = 0x100,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopro_odma = {
|
static const struct ddb_regset octopro_odma = {
|
||||||
.base = 0xc00,
|
.base = 0xc00,
|
||||||
.num = 0x20,
|
.num = 0x20,
|
||||||
.size = 0x10,
|
.size = 0x10,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopro_odma_buf = {
|
static const struct ddb_regset octopro_odma_buf = {
|
||||||
.base = 0x8000,
|
.base = 0x8000,
|
||||||
.num = 0x20,
|
.num = 0x20,
|
||||||
.size = 0x100,
|
.size = 0x100,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopro_i2c = {
|
static const struct ddb_regset octopro_i2c = {
|
||||||
.base = 0x200,
|
.base = 0x200,
|
||||||
.num = 0x0a,
|
.num = 0x0a,
|
||||||
.size = 0x20,
|
.size = 0x20,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopro_i2c_buf = {
|
static const struct ddb_regset octopro_i2c_buf = {
|
||||||
.base = 0x2000,
|
.base = 0x2000,
|
||||||
.num = 0x0a,
|
.num = 0x0a,
|
||||||
.size = 0x200,
|
.size = 0x200,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopro_gtl = {
|
static const struct ddb_regset octopro_gtl = {
|
||||||
.base = 0xe00,
|
.base = 0xe00,
|
||||||
.num = 0x03,
|
.num = 0x03,
|
||||||
.size = 0x40,
|
.size = 0x40,
|
||||||
@ -181,7 +181,7 @@ static struct ddb_regset octopro_gtl = {
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_regmap octopus_map = {
|
static const struct ddb_regmap octopus_map = {
|
||||||
.irq_version = 1,
|
.irq_version = 1,
|
||||||
.irq_base_i2c = 0,
|
.irq_base_i2c = 0,
|
||||||
.irq_base_idma = 8,
|
.irq_base_idma = 8,
|
||||||
@ -196,7 +196,7 @@ static struct ddb_regmap octopus_map = {
|
|||||||
.output = &octopus_output,
|
.output = &octopus_output,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regmap octopro_map = {
|
static const struct ddb_regmap octopro_map = {
|
||||||
.irq_version = 2,
|
.irq_version = 2,
|
||||||
.irq_base_i2c = 32,
|
.irq_base_i2c = 32,
|
||||||
.irq_base_idma = 64,
|
.irq_base_idma = 64,
|
||||||
@ -213,7 +213,7 @@ static struct ddb_regmap octopro_map = {
|
|||||||
.gtl = &octopro_gtl,
|
.gtl = &octopro_gtl,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regmap octopro_hdin_map = {
|
static const struct ddb_regmap octopro_hdin_map = {
|
||||||
.irq_version = 2,
|
.irq_version = 2,
|
||||||
.irq_base_i2c = 32,
|
.irq_base_i2c = 32,
|
||||||
.irq_base_idma = 64,
|
.irq_base_idma = 64,
|
||||||
@ -228,7 +228,7 @@ static struct ddb_regmap octopro_hdin_map = {
|
|||||||
.output = &octopro_output,
|
.output = &octopro_output,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regmap octopus_mod_map = {
|
static const struct ddb_regmap octopus_mod_map = {
|
||||||
.irq_version = 1,
|
.irq_version = 1,
|
||||||
.irq_base_odma = 8,
|
.irq_base_odma = 8,
|
||||||
.irq_base_rate = 18,
|
.irq_base_rate = 18,
|
||||||
@ -238,7 +238,7 @@ static struct ddb_regmap octopus_mod_map = {
|
|||||||
.channel = &octopus_mod_channel,
|
.channel = &octopus_mod_channel,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regmap octopus_mod_2_map = {
|
static const struct ddb_regmap octopus_mod_2_map = {
|
||||||
.irq_version = 2,
|
.irq_version = 2,
|
||||||
.irq_base_odma = 64,
|
.irq_base_odma = 64,
|
||||||
.irq_base_rate = 32,
|
.irq_base_rate = 32,
|
||||||
@ -248,7 +248,7 @@ static struct ddb_regmap octopus_mod_2_map = {
|
|||||||
.channel = &octopus_mod_2_channel,
|
.channel = &octopus_mod_2_channel,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regmap octopus_sdr_map = {
|
static const struct ddb_regmap octopus_sdr_map = {
|
||||||
.irq_version = 2,
|
.irq_version = 2,
|
||||||
.irq_base_odma = 64,
|
.irq_base_odma = 64,
|
||||||
.irq_base_rate = 32,
|
.irq_base_rate = 32,
|
||||||
@ -261,13 +261,13 @@ static struct ddb_regmap octopus_sdr_map = {
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_info ddb_none = {
|
static const struct ddb_info ddb_none = {
|
||||||
.type = DDB_NONE,
|
.type = DDB_NONE,
|
||||||
.name = "unknown Digital Devices device, install newer driver",
|
.name = "unknown Digital Devices device, install newer driver",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octopus = {
|
static const struct ddb_info ddb_octopus = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Octopus DVB adapter",
|
.name = "Digital Devices Octopus DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -275,7 +275,7 @@ static struct ddb_info ddb_octopus = {
|
|||||||
.i2c_mask = 0x0f,
|
.i2c_mask = 0x0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octopusv3 = {
|
static const struct ddb_info ddb_octopusv3 = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Octopus V3 DVB adapter",
|
.name = "Digital Devices Octopus V3 DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -283,7 +283,7 @@ static struct ddb_info ddb_octopusv3 = {
|
|||||||
.i2c_mask = 0x0f,
|
.i2c_mask = 0x0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octopus_le = {
|
static const struct ddb_info ddb_octopus_le = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Octopus LE DVB adapter",
|
.name = "Digital Devices Octopus LE DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -291,7 +291,7 @@ static struct ddb_info ddb_octopus_le = {
|
|||||||
.i2c_mask = 0x03,
|
.i2c_mask = 0x03,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octopus_oem = {
|
static const struct ddb_info ddb_octopus_oem = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Octopus OEM",
|
.name = "Digital Devices Octopus OEM",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -303,7 +303,7 @@ static struct ddb_info ddb_octopus_oem = {
|
|||||||
.temp_bus = 0,
|
.temp_bus = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octopus_mini = {
|
static const struct ddb_info ddb_octopus_mini = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Octopus Mini",
|
.name = "Digital Devices Octopus Mini",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -311,7 +311,7 @@ static struct ddb_info ddb_octopus_mini = {
|
|||||||
.i2c_mask = 0x0f,
|
.i2c_mask = 0x0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_v6 = {
|
static const struct ddb_info ddb_v6 = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Cine S2 V6 DVB adapter",
|
.name = "Digital Devices Cine S2 V6 DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -319,7 +319,7 @@ static struct ddb_info ddb_v6 = {
|
|||||||
.i2c_mask = 0x07,
|
.i2c_mask = 0x07,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_v6_5 = {
|
static const struct ddb_info ddb_v6_5 = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Cine S2 V6.5 DVB adapter",
|
.name = "Digital Devices Cine S2 V6.5 DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -327,7 +327,7 @@ static struct ddb_info ddb_v6_5 = {
|
|||||||
.i2c_mask = 0x0f,
|
.i2c_mask = 0x0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_v7a = {
|
static const struct ddb_info ddb_v7a = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Cine S2 V7 Advanced DVB adapter",
|
.name = "Digital Devices Cine S2 V7 Advanced DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -338,7 +338,7 @@ static struct ddb_info ddb_v7a = {
|
|||||||
.ts_quirks = TS_QUIRK_REVERSED,
|
.ts_quirks = TS_QUIRK_REVERSED,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_v7 = {
|
static const struct ddb_info ddb_v7 = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Cine S2 V7 DVB adapter",
|
.name = "Digital Devices Cine S2 V7 DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -349,7 +349,7 @@ static struct ddb_info ddb_v7 = {
|
|||||||
.ts_quirks = TS_QUIRK_REVERSED,
|
.ts_quirks = TS_QUIRK_REVERSED,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_ctv7 = {
|
static const struct ddb_info ddb_ctv7 = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices Cine CT V7 DVB adapter",
|
.name = "Digital Devices Cine CT V7 DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -359,7 +359,7 @@ static struct ddb_info ddb_ctv7 = {
|
|||||||
.board_control_2 = 4,
|
.board_control_2 = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_satixs2v3 = {
|
static const struct ddb_info ddb_satixs2v3 = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Mystique SaTiX-S2 V3 DVB adapter",
|
.name = "Mystique SaTiX-S2 V3 DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -367,7 +367,7 @@ static struct ddb_info ddb_satixs2v3 = {
|
|||||||
.i2c_mask = 0x07,
|
.i2c_mask = 0x07,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_ci = {
|
static const struct ddb_info ddb_ci = {
|
||||||
.type = DDB_OCTOPUS_CI,
|
.type = DDB_OCTOPUS_CI,
|
||||||
.name = "Digital Devices Octopus CI",
|
.name = "Digital Devices Octopus CI",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -375,7 +375,7 @@ static struct ddb_info ddb_ci = {
|
|||||||
.i2c_mask = 0x03,
|
.i2c_mask = 0x03,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_cis = {
|
static const struct ddb_info ddb_cis = {
|
||||||
.type = DDB_OCTOPUS_CI,
|
.type = DDB_OCTOPUS_CI,
|
||||||
.name = "Digital Devices Octopus CI single",
|
.name = "Digital Devices Octopus CI single",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -383,7 +383,7 @@ static struct ddb_info ddb_cis = {
|
|||||||
.i2c_mask = 0x03,
|
.i2c_mask = 0x03,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_ci_s2_pro = {
|
static const struct ddb_info ddb_ci_s2_pro = {
|
||||||
.type = DDB_OCTOPUS_CI,
|
.type = DDB_OCTOPUS_CI,
|
||||||
.name = "Digital Devices Octopus CI S2 Pro",
|
.name = "Digital Devices Octopus CI S2 Pro",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -393,7 +393,7 @@ static struct ddb_info ddb_ci_s2_pro = {
|
|||||||
.board_control_2 = 4,
|
.board_control_2 = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_ci_s2_pro_a = {
|
static const struct ddb_info ddb_ci_s2_pro_a = {
|
||||||
.type = DDB_OCTOPUS_CI,
|
.type = DDB_OCTOPUS_CI,
|
||||||
.name = "Digital Devices Octopus CI S2 Pro Advanced",
|
.name = "Digital Devices Octopus CI S2 Pro Advanced",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -403,7 +403,7 @@ static struct ddb_info ddb_ci_s2_pro_a = {
|
|||||||
.board_control_2 = 4,
|
.board_control_2 = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_dvbct = {
|
static const struct ddb_info ddb_dvbct = {
|
||||||
.type = DDB_OCTOPUS,
|
.type = DDB_OCTOPUS,
|
||||||
.name = "Digital Devices DVBCT V6.1 DVB adapter",
|
.name = "Digital Devices DVBCT V6.1 DVB adapter",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -413,7 +413,7 @@ static struct ddb_info ddb_dvbct = {
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_info ddb_mod = {
|
static const struct ddb_info ddb_mod = {
|
||||||
.type = DDB_MOD,
|
.type = DDB_MOD,
|
||||||
.name = "Digital Devices DVB-C modulator",
|
.name = "Digital Devices DVB-C modulator",
|
||||||
.regmap = &octopus_mod_map,
|
.regmap = &octopus_mod_map,
|
||||||
@ -421,7 +421,15 @@ static struct ddb_info ddb_mod = {
|
|||||||
.temp_num = 1,
|
.temp_num = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_mod_fsm_24 = {
|
static const struct ddb_info ddb_mod_4 = {
|
||||||
|
.type = DDB_MOD,
|
||||||
|
.name = "Digital Devices DVB-C modulator",
|
||||||
|
.regmap = &octopus_mod_map,
|
||||||
|
.port_num = 4,
|
||||||
|
.temp_num = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct ddb_info ddb_mod_fsm_24 = {
|
||||||
.type = DDB_MOD,
|
.type = DDB_MOD,
|
||||||
.version = 2,
|
.version = 2,
|
||||||
.name = "Digital Devices DVB-C modulator FSM-24",
|
.name = "Digital Devices DVB-C modulator FSM-24",
|
||||||
@ -431,7 +439,7 @@ static struct ddb_info ddb_mod_fsm_24 = {
|
|||||||
.tempmon_irq = 8,
|
.tempmon_irq = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_mod_fsm_16 = {
|
static const struct ddb_info ddb_mod_fsm_16 = {
|
||||||
.type = DDB_MOD,
|
.type = DDB_MOD,
|
||||||
.version = 2,
|
.version = 2,
|
||||||
.name = "Digital Devices DVB-C modulator FSM-16",
|
.name = "Digital Devices DVB-C modulator FSM-16",
|
||||||
@ -441,7 +449,7 @@ static struct ddb_info ddb_mod_fsm_16 = {
|
|||||||
.tempmon_irq = 8,
|
.tempmon_irq = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_mod_fsm_8 = {
|
static const struct ddb_info ddb_mod_fsm_8 = {
|
||||||
.type = DDB_MOD,
|
.type = DDB_MOD,
|
||||||
.name = "Digital Devices DVB-C modulator FSM-8",
|
.name = "Digital Devices DVB-C modulator FSM-8",
|
||||||
.version = 2,
|
.version = 2,
|
||||||
@ -451,7 +459,17 @@ static struct ddb_info ddb_mod_fsm_8 = {
|
|||||||
.tempmon_irq = 8,
|
.tempmon_irq = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_sdr = {
|
static const struct ddb_info ddb_mod_fsm_4 = {
|
||||||
|
.type = DDB_MOD,
|
||||||
|
.name = "Digital Devices DVB-C modulator FSM-8",
|
||||||
|
.version = 2,
|
||||||
|
.regmap = &octopus_mod_2_map,
|
||||||
|
.port_num = 4,
|
||||||
|
.temp_num = 1,
|
||||||
|
.tempmon_irq = 8,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct ddb_info ddb_sdr = {
|
||||||
.type = DDB_MOD,
|
.type = DDB_MOD,
|
||||||
.name = "Digital Devices SDR",
|
.name = "Digital Devices SDR",
|
||||||
.version = 3,
|
.version = 3,
|
||||||
@ -461,7 +479,7 @@ static struct ddb_info ddb_sdr = {
|
|||||||
.tempmon_irq = 8,
|
.tempmon_irq = 8,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octopro_hdin = {
|
static const struct ddb_info ddb_octopro_hdin = {
|
||||||
.type = DDB_OCTOPRO_HDIN,
|
.type = DDB_OCTOPRO_HDIN,
|
||||||
.name = "Digital Devices OctopusNet Pro HDIN",
|
.name = "Digital Devices OctopusNet Pro HDIN",
|
||||||
.regmap = &octopro_hdin_map,
|
.regmap = &octopro_hdin_map,
|
||||||
@ -470,7 +488,7 @@ static struct ddb_info ddb_octopro_hdin = {
|
|||||||
.mdio_num = 1,
|
.mdio_num = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octopro = {
|
static const struct ddb_info ddb_octopro = {
|
||||||
.type = DDB_OCTOPRO,
|
.type = DDB_OCTOPRO,
|
||||||
.name = "Digital Devices OctopusNet Pro",
|
.name = "Digital Devices OctopusNet Pro",
|
||||||
.regmap = &octopro_map,
|
.regmap = &octopro_map,
|
||||||
@ -479,7 +497,7 @@ static struct ddb_info ddb_octopro = {
|
|||||||
.mdio_num = 1,
|
.mdio_num = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_s2_48 = {
|
static const struct ddb_info ddb_s2_48 = {
|
||||||
.type = DDB_OCTOPUS_MAX,
|
.type = DDB_OCTOPUS_MAX,
|
||||||
.name = "Digital Devices MAX S8 4/8",
|
.name = "Digital Devices MAX S8 4/8",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -489,7 +507,7 @@ static struct ddb_info ddb_s2_48 = {
|
|||||||
.tempmon_irq = 24,
|
.tempmon_irq = 24,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_ct2_8 = {
|
static const struct ddb_info ddb_ct2_8 = {
|
||||||
.type = DDB_OCTOPUS_MAX_CT,
|
.type = DDB_OCTOPUS_MAX_CT,
|
||||||
.name = "Digital Devices MAX A8 CT2",
|
.name = "Digital Devices MAX A8 CT2",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -501,7 +519,7 @@ static struct ddb_info ddb_ct2_8 = {
|
|||||||
.tempmon_irq = 24,
|
.tempmon_irq = 24,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_c2t2_8 = {
|
static const struct ddb_info ddb_c2t2_8 = {
|
||||||
.type = DDB_OCTOPUS_MAX_CT,
|
.type = DDB_OCTOPUS_MAX_CT,
|
||||||
.name = "Digital Devices MAX A8 C2T2",
|
.name = "Digital Devices MAX A8 C2T2",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -513,7 +531,7 @@ static struct ddb_info ddb_c2t2_8 = {
|
|||||||
.tempmon_irq = 24,
|
.tempmon_irq = 24,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_isdbt_8 = {
|
static const struct ddb_info ddb_isdbt_8 = {
|
||||||
.type = DDB_OCTOPUS_MAX_CT,
|
.type = DDB_OCTOPUS_MAX_CT,
|
||||||
.name = "Digital Devices MAX A8 ISDBT",
|
.name = "Digital Devices MAX A8 ISDBT",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -525,7 +543,7 @@ static struct ddb_info ddb_isdbt_8 = {
|
|||||||
.tempmon_irq = 24,
|
.tempmon_irq = 24,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_c2t2i_v0_8 = {
|
static const struct ddb_info ddb_c2t2i_v0_8 = {
|
||||||
.type = DDB_OCTOPUS_MAX_CT,
|
.type = DDB_OCTOPUS_MAX_CT,
|
||||||
.name = "Digital Devices MAX A8 C2T2I V0",
|
.name = "Digital Devices MAX A8 C2T2I V0",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -537,7 +555,7 @@ static struct ddb_info ddb_c2t2i_v0_8 = {
|
|||||||
.tempmon_irq = 24,
|
.tempmon_irq = 24,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_c2t2i_8 = {
|
static const struct ddb_info ddb_c2t2i_8 = {
|
||||||
.type = DDB_OCTOPUS_MAX_CT,
|
.type = DDB_OCTOPUS_MAX_CT,
|
||||||
.name = "Digital Devices MAX A8 C2T2I",
|
.name = "Digital Devices MAX A8 C2T2I",
|
||||||
.regmap = &octopus_map,
|
.regmap = &octopus_map,
|
||||||
@ -552,7 +570,7 @@ static struct ddb_info ddb_c2t2i_8 = {
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
static struct ddb_regmap octopus_net_map = {
|
static const struct ddb_regmap octopus_net_map = {
|
||||||
.irq_version = 1,
|
.irq_version = 1,
|
||||||
.irq_base_i2c = 0,
|
.irq_base_i2c = 0,
|
||||||
.i2c = &octopus_i2c,
|
.i2c = &octopus_i2c,
|
||||||
@ -561,13 +579,13 @@ static struct ddb_regmap octopus_net_map = {
|
|||||||
.output = &octopus_output,
|
.output = &octopus_output,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regset octopus_gtl = {
|
static const struct ddb_regset octopus_gtl = {
|
||||||
.base = 0x180,
|
.base = 0x180,
|
||||||
.num = 0x01,
|
.num = 0x01,
|
||||||
.size = 0x20,
|
.size = 0x20,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_regmap octopus_net_gtl = {
|
static const struct ddb_regmap octopus_net_gtl = {
|
||||||
.irq_version = 1,
|
.irq_version = 1,
|
||||||
.irq_base_i2c = 0,
|
.irq_base_i2c = 0,
|
||||||
.irq_base_gtl = 10,
|
.irq_base_gtl = 10,
|
||||||
@ -578,7 +596,7 @@ static struct ddb_regmap octopus_net_gtl = {
|
|||||||
.gtl = &octopus_gtl,
|
.gtl = &octopus_gtl,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octonet = {
|
static const struct ddb_info ddb_octonet = {
|
||||||
.type = DDB_OCTONET,
|
.type = DDB_OCTONET,
|
||||||
.name = "Digital Devices OctopusNet network DVB adapter",
|
.name = "Digital Devices OctopusNet network DVB adapter",
|
||||||
.regmap = &octopus_net_map,
|
.regmap = &octopus_net_map,
|
||||||
@ -588,7 +606,7 @@ static struct ddb_info ddb_octonet = {
|
|||||||
.mdio_num = 1,
|
.mdio_num = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octonet_jse = {
|
static const struct ddb_info ddb_octonet_jse = {
|
||||||
.type = DDB_OCTONET,
|
.type = DDB_OCTONET,
|
||||||
.name = "Digital Devices OctopusNet network DVB adapter JSE",
|
.name = "Digital Devices OctopusNet network DVB adapter JSE",
|
||||||
.regmap = &octopus_net_map,
|
.regmap = &octopus_net_map,
|
||||||
@ -598,7 +616,7 @@ static struct ddb_info ddb_octonet_jse = {
|
|||||||
.mdio_num = 1,
|
.mdio_num = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ddb_info ddb_octonet_gtl = {
|
static const struct ddb_info ddb_octonet_gtl = {
|
||||||
.type = DDB_OCTONET,
|
.type = DDB_OCTONET,
|
||||||
.name = "Digital Devices OctopusNet GTL",
|
.name = "Digital Devices OctopusNet GTL",
|
||||||
.regmap = &octopus_net_gtl,
|
.regmap = &octopus_net_gtl,
|
||||||
@ -618,7 +636,7 @@ struct ddb_device_id {
|
|||||||
u16 device;
|
u16 device;
|
||||||
u16 subvendor;
|
u16 subvendor;
|
||||||
u16 subdevice;
|
u16 subdevice;
|
||||||
struct ddb_info *info;
|
const struct ddb_info *info;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DDB_DEVID(_device, _subdevice, _info) { \
|
#define DDB_DEVID(_device, _subdevice, _info) { \
|
||||||
@ -628,7 +646,7 @@ struct ddb_device_id {
|
|||||||
.subdevice = _subdevice, \
|
.subdevice = _subdevice, \
|
||||||
.info = &(_info) }
|
.info = &(_info) }
|
||||||
|
|
||||||
static struct ddb_device_id ddb_device_ids[] = {
|
static const struct ddb_device_id ddb_device_ids[] = {
|
||||||
/* OctopusNet */
|
/* OctopusNet */
|
||||||
DDB_DEVID(0x0300, 0xffff, ddb_octonet),
|
DDB_DEVID(0x0300, 0xffff, ddb_octonet),
|
||||||
DDB_DEVID(0x0301, 0xffff, ddb_octonet_jse),
|
DDB_DEVID(0x0301, 0xffff, ddb_octonet_jse),
|
||||||
@ -664,10 +682,12 @@ static struct ddb_device_id ddb_device_ids[] = {
|
|||||||
DDB_DEVID(0x0013, 0x0044, ddb_ci_s2_pro_a),
|
DDB_DEVID(0x0013, 0x0044, ddb_ci_s2_pro_a),
|
||||||
DDB_DEVID(0x0201, 0x0001, ddb_mod),
|
DDB_DEVID(0x0201, 0x0001, ddb_mod),
|
||||||
DDB_DEVID(0x0201, 0x0002, ddb_mod),
|
DDB_DEVID(0x0201, 0x0002, ddb_mod),
|
||||||
|
DDB_DEVID(0x0201, 0x0004, ddb_mod_4), /* dummy entry ! */
|
||||||
DDB_DEVID(0x0203, 0x0001, ddb_mod),
|
DDB_DEVID(0x0203, 0x0001, ddb_mod),
|
||||||
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),
|
||||||
DDB_DEVID(0x0210, 0x0003, ddb_mod_fsm_8),
|
DDB_DEVID(0x0210, 0x0003, ddb_mod_fsm_8),
|
||||||
|
DDB_DEVID(0x0210, 0x0004, ddb_mod_fsm_4), /* dummy entry ! */
|
||||||
DDB_DEVID(0x0220, 0x0001, ddb_sdr),
|
DDB_DEVID(0x0220, 0x0001, ddb_sdr),
|
||||||
/* testing on OctopusNet Pro */
|
/* testing on OctopusNet Pro */
|
||||||
DDB_DEVID(0x0320, 0xffff, ddb_octopro_hdin),
|
DDB_DEVID(0x0320, 0xffff, ddb_octopro_hdin),
|
||||||
@ -678,18 +698,18 @@ static struct ddb_device_id ddb_device_ids[] = {
|
|||||||
DDB_DEVID(0x0329, 0xffff, ddb_octopro_hdin),
|
DDB_DEVID(0x0329, 0xffff, ddb_octopro_hdin),
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ddb_info *get_ddb_info(u16 vendor, u16 device,
|
const struct ddb_info *get_ddb_info(u16 vendor, u16 device,
|
||||||
u16 subvendor, u16 subdevice)
|
u16 subvendor, u16 subdevice)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(ddb_device_ids); i++) {
|
for (i = 0; i < ARRAY_SIZE(ddb_device_ids); i++) {
|
||||||
struct ddb_device_id *id = &ddb_device_ids[i];
|
const struct ddb_device_id *id = &ddb_device_ids[i];
|
||||||
|
|
||||||
if (vendor == id->vendor &&
|
if (vendor == id->vendor &&
|
||||||
device == id->device &&
|
device == id->device &&
|
||||||
subvendor == id->subvendor &&
|
subvendor == id->subvendor &&
|
||||||
((subdevice == id->subdevice) ||
|
(subdevice == id->subdevice ||
|
||||||
id->subdevice == 0xffff))
|
id->subdevice == 0xffff))
|
||||||
return id->info;
|
return id->info;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,8 @@ static void i2c_handler(unsigned long priv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int ddb_i2c_add(struct ddb *dev, struct ddb_i2c *i2c,
|
static int ddb_i2c_add(struct ddb *dev, struct ddb_i2c *i2c,
|
||||||
struct ddb_regmap *regmap, int link, int i, int num)
|
const struct ddb_regmap *regmap,
|
||||||
|
int link, int i, int num)
|
||||||
{
|
{
|
||||||
struct i2c_adapter *adap;
|
struct i2c_adapter *adap;
|
||||||
|
|
||||||
@ -185,7 +186,7 @@ int ddb_i2c_init(struct ddb *dev)
|
|||||||
u32 i, j, num = 0, l, base;
|
u32 i, j, num = 0, l, base;
|
||||||
struct ddb_i2c *i2c;
|
struct ddb_i2c *i2c;
|
||||||
struct i2c_adapter *adap;
|
struct i2c_adapter *adap;
|
||||||
struct ddb_regmap *regmap;
|
const struct ddb_regmap *regmap;
|
||||||
|
|
||||||
for (l = 0; l < DDB_MAX_LINK; l++) {
|
for (l = 0; l < DDB_MAX_LINK; l++) {
|
||||||
if (!dev->link[l].info)
|
if (!dev->link[l].info)
|
||||||
|
@ -283,10 +283,12 @@ static int __devinit ddb_probe(struct pci_dev *pdev,
|
|||||||
if (dev->link[0].info->type != DDB_MOD)
|
if (dev->link[0].info->type != DDB_MOD)
|
||||||
ddbwritel(dev, 0, DMA_BASE_WRITE);
|
ddbwritel(dev, 0, DMA_BASE_WRITE);
|
||||||
|
|
||||||
if (dev->link[0].info->type == DDB_MOD) {
|
if (dev->link[0].info->type == DDB_MOD
|
||||||
if (dev->link[0].info->version <= 1)
|
&& dev->link[0].info->version <= 1) {
|
||||||
if (ddbreadl(dev, 0x1c) == 4)
|
if (ddbreadl(dev, 0x1c) == 4)
|
||||||
dev->link[0].info->port_num = 4;
|
dev->link[0].info =
|
||||||
|
get_ddb_info(0xdd01, 0x0201,
|
||||||
|
0xdd01, 0x0004);
|
||||||
}
|
}
|
||||||
|
|
||||||
stat = ddb_irq_init(dev);
|
stat = ddb_irq_init(dev);
|
||||||
|
@ -518,8 +518,9 @@ static int mod_fsm_setup(struct ddb *dev, u32 FrequencyPlan,
|
|||||||
ddbwritel(dev, FSM_GAIN_N96, FSM_GAIN);
|
ddbwritel(dev, FSM_GAIN_N96, FSM_GAIN);
|
||||||
|
|
||||||
ddbwritel(dev, FSM_CONTROL_ENABLE, FSM_CONTROL);
|
ddbwritel(dev, FSM_CONTROL_ENABLE, FSM_CONTROL);
|
||||||
dev->link[0].info->port_num = MaxUsedChannels;
|
if (MaxUsedChannels == 4)
|
||||||
|
dev->link[0].info = get_ddb_info(0xdd01, 0x0210,
|
||||||
|
0xdd01, 0x0004);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,18 +116,18 @@ struct ddb_regmap {
|
|||||||
u32 irq_base_gtl;
|
u32 irq_base_gtl;
|
||||||
u32 irq_base_rate;
|
u32 irq_base_rate;
|
||||||
|
|
||||||
struct ddb_regset *i2c;
|
const struct ddb_regset *i2c;
|
||||||
struct ddb_regset *i2c_buf;
|
const struct ddb_regset *i2c_buf;
|
||||||
struct ddb_regset *idma;
|
const struct ddb_regset *idma;
|
||||||
struct ddb_regset *idma_buf;
|
const struct ddb_regset *idma_buf;
|
||||||
struct ddb_regset *odma;
|
const struct ddb_regset *odma;
|
||||||
struct ddb_regset *odma_buf;
|
const struct ddb_regset *odma_buf;
|
||||||
|
|
||||||
struct ddb_regset *input;
|
const struct ddb_regset *input;
|
||||||
struct ddb_regset *output;
|
const struct ddb_regset *output;
|
||||||
|
|
||||||
struct ddb_regset *channel;
|
const struct ddb_regset *channel;
|
||||||
struct ddb_regset *gtl;
|
const struct ddb_regset *gtl;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ddb_ids {
|
struct ddb_ids {
|
||||||
@ -172,7 +172,7 @@ struct ddb_info {
|
|||||||
#define TS_QUIRK_NO_OUTPUT 4
|
#define TS_QUIRK_NO_OUTPUT 4
|
||||||
#define TS_QUIRK_ALT_OSC 8
|
#define TS_QUIRK_ALT_OSC 8
|
||||||
u32 tempmon_irq;
|
u32 tempmon_irq;
|
||||||
struct ddb_regmap *regmap;
|
const struct ddb_regmap *regmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* DMA_SIZE MUST be smaller than 256k and
|
/* DMA_SIZE MUST be smaller than 256k and
|
||||||
@ -414,7 +414,7 @@ struct ddb_lnb {
|
|||||||
|
|
||||||
struct ddb_link {
|
struct ddb_link {
|
||||||
struct ddb *dev;
|
struct ddb *dev;
|
||||||
struct ddb_info *info;
|
const struct ddb_info *info;
|
||||||
u32 nr;
|
u32 nr;
|
||||||
u32 regs;
|
u32 regs;
|
||||||
spinlock_t lock; /* lock link access */
|
spinlock_t lock; /* lock link access */
|
||||||
@ -534,8 +534,8 @@ int ddbridge_flashread(struct ddb *dev, u32 link, u8 *buf, u32 addr, u32 len);
|
|||||||
|
|
||||||
/* linked function prototypes */
|
/* linked function prototypes */
|
||||||
|
|
||||||
struct ddb_info *get_ddb_info(u16 vendor, u16 device,
|
const struct ddb_info *get_ddb_info(u16 vendor, u16 device,
|
||||||
u16 subvendor, u16 subdevice);
|
u16 subvendor, u16 subdevice);
|
||||||
int netstream_init(struct ddb_input *input);
|
int netstream_init(struct ddb_input *input);
|
||||||
int ddb_dvb_ns_input_start(struct ddb_input *input);
|
int ddb_dvb_ns_input_start(struct ddb_input *input);
|
||||||
int ddb_dvb_ns_input_stop(struct ddb_input *input);
|
int ddb_dvb_ns_input_stop(struct ddb_input *input);
|
||||||
|
Loading…
Reference in New Issue
Block a user