octopro testing

This commit is contained in:
Ralph Metzler 2016-05-03 22:05:29 +02:00
parent 535ffa6ca6
commit 40edadad3d
4 changed files with 33 additions and 24 deletions

View File

@ -234,6 +234,21 @@ static struct ddb_regmap octopro_map = {
.gtl = &octopro_gtl,
};
static struct ddb_regmap octopro_hdin_map = {
.irq_version = 2,
.irq_base_i2c = 32,
.irq_base_idma = 64,
.irq_base_odma = 128,
.i2c = &octopro_i2c,
.i2c_buf = &octopro_i2c_buf,
.idma = &octopro_idma,
.idma_buf = &octopro_idma_buf,
.odma = &octopro_odma,
.odma_buf = &octopro_odma_buf,
.input = &octopro_input,
.output = &octopro_output,
};
static struct ddb_regset octopus_mod_channel = {
.base = 0x400,
.num = 0x0c,
@ -643,9 +658,6 @@ static void ddb_input_start(struct ddb_input *input)
input->dma->running = 1;
spin_unlock_irq(&input->dma->lock);
}
pr_info("input_start %u.%u.%u\n",
dev->nr, input->port->lnr, input->nr);
pr_info("dmaregs = %08x\n", input->dma->regs);
}
@ -3566,6 +3578,8 @@ static irqreturn_t irq_handler_v2(int irq, void *dev_id)
}
if (s & 0x00000004)
irq_handle_v2_n(dev, 3);
if (s & 0x0000ff00)
;//pr_info("irq_handler_v2 s=%08x\n", s);
IRQ_HANDLE(8);
IRQ_HANDLE(9);
IRQ_HANDLE(10);
@ -4837,6 +4851,7 @@ static void gtl_irq_handler(unsigned long priv)
while ((s = ddbreadl(dev, tag | INTERRUPT_STATUS))) {
ddbwritel(dev, s, tag | INTERRUPT_ACK);
//pr_info("gtlirq %08x\n", s);
LINK_IRQ_HANDLE(l, 0);
LINK_IRQ_HANDLE(l, 1);
LINK_IRQ_HANDLE(l, 2);
@ -4861,6 +4876,10 @@ static int ddb_gtl_init_link(struct ddb *dev, u32 l)
link->lnb.fmode = 0xffffffff;
mutex_init(&link->flash_mutex);
link->nr = l;
link->dev = dev;
link->regs = regs;
if (!(1 & ddbreadl(dev, regs))) {
u32 c;
@ -4875,10 +4894,6 @@ static int ddb_gtl_init_link(struct ddb *dev, u32 l)
if (c == 5)
return -1;
}
link->nr = l;
link->dev = dev;
link->regs = regs;
id = ddbreadl(dev, DDB_LINK_TAG(l) | 8);
switch (id) {
case 0x0007dd01:

View File

@ -60,7 +60,7 @@ static void ddb_unmap(struct ddb *dev)
static void __devexit ddb_irq_disable(struct ddb *dev)
{
if (dev->link[0].info->regmap->irq_version == 2) {
//ddbwritel(dev, 0x00000000, INTERRUPT_V2_CONTROL);
ddbwritel(dev, 0x00000000, INTERRUPT_V2_CONTROL);
ddbwritel(dev, 0x00000000, INTERRUPT_V2_ENABLE_1);
ddbwritel(dev, 0x00000000, INTERRUPT_V2_ENABLE_2);
ddbwritel(dev, 0x00000000, INTERRUPT_V2_ENABLE_3);
@ -166,8 +166,8 @@ static int __devinit ddb_irq_init2(struct ddb *dev)
irq_flag, "ddbridge", (void *) dev);
if (stat < 0)
return stat;
//ddbwritel(dev, 0x0f, INTERRUPT_V2_CONTROL);
ddbwritel(dev, 0x0000ff7f, INTERRUPT_V2_CONTROL);
ddbwritel(dev, 0xffffffff, INTERRUPT_V2_ENABLE_1);
ddbwritel(dev, 0xffffffff, INTERRUPT_V2_ENABLE_2);
ddbwritel(dev, 0xffffffff, INTERRUPT_V2_ENABLE_3);
@ -471,9 +471,9 @@ static struct ddb_info ddb_mod = {
static struct ddb_info ddb_octopro_hdin = {
.type = DDB_OCTOPRO_HDIN,
.name = "Digital Devices OctopusNet Pro HDIN",
.regmap = &octopus_map,
.port_num = 1,
.i2c_mask = 0x00,
.regmap = &octopro_hdin_map,
.port_num = 10,
.i2c_mask = 0x3ff,
.mdio_num = 1,
};
@ -481,8 +481,8 @@ static struct ddb_info ddb_octopro = {
.type = DDB_OCTOPRO,
.name = "Digital Devices OctopusNet Pro",
.regmap = &octopro_map,
.port_num = 4,
.i2c_mask = 0x0f,
.port_num = 10,
.i2c_mask = 0x3ff,
.mdio_num = 1,
};
@ -524,7 +524,7 @@ static const struct pci_device_id ddb_id_tbl[] __devinitconst = {
DDB_ID(DDVID, 0x0201, DDVID, 0x0001, ddb_mod),
DDB_ID(DDVID, 0x0201, DDVID, 0x0002, ddb_mod),
/* testing on OctopusNet Pro */
DDB_ID(DDVID, 0x0320, PCI_ANY_ID, PCI_ANY_ID, ddb_octopro),
DDB_ID(DDVID, 0x0320, PCI_ANY_ID, PCI_ANY_ID, ddb_octopro_hdin),
DDB_ID(DDVID, 0x0321, PCI_ANY_ID, PCI_ANY_ID, ddb_none),
DDB_ID(DDVID, 0x0322, PCI_ANY_ID, PCI_ANY_ID, ddb_octopro),
DDB_ID(DDVID, 0x0323, PCI_ANY_ID, PCI_ANY_ID, ddb_none),

View File

@ -425,8 +425,8 @@ struct ddb {
struct ddb_dma idma[DDB_MAX_INPUT];
struct ddb_dma odma[DDB_MAX_OUTPUT];
void (*handler[4][128])(unsigned long);
unsigned long handler_data[4][128];
void (*handler[4][256])(unsigned long);
unsigned long handler_data[4][256];
struct device *ddb_dev;
u32 ddb_dev_users;

View File

@ -37,9 +37,6 @@ MODULE_PARM_DESC(adapter_alloc,
static struct ddb_regmap octopus_net_map = {
.irq_version = 1,
.irq_base_i2c = 0,
.irq_base_idma = 8,
.i2c = &octopus_i2c,
.i2c_buf = &octopus_i2c_buf,
.i2c = &octopus_i2c,
.i2c_buf = &octopus_i2c_buf,
.input = &octopus_input,
@ -55,12 +52,9 @@ static struct ddb_regset octopus_gtl = {
static struct ddb_regmap octopus_net_gtl = {
.irq_version = 1,
.irq_base_i2c = 0,
.irq_base_idma = 8,
.irq_base_gtl = 10,
.i2c = &octopus_i2c,
.i2c_buf = &octopus_i2c_buf,
.i2c = &octopus_i2c,
.i2c_buf = &octopus_i2c_buf,
.input = &octopus_input,
.output = &octopus_output,
.gtl = &octopus_gtl,