Cobalt Qube and PCI ISDN card

Miquel van Smoorenburg (miquels@cistron.nl)
10 Nov 1998 22:40:06 +0100


I'm trying to get a TelesPCI (European ISDN card) to work in a Qube.
I've taken the qube kernel source, 2.0.33, and put in the latest
isdn drivers from 2.0.36-pre15. This works - I get a kernel that
boots. But if I insert the card, the kernel hangs.

Even though the Qube has no console I've pinpointed where exactly
it hangs, in drivers/isdn/hisax/telespci.c

The code does this:

First it finds the Teles PCI card successfully:

if (pcibios_find_device (0x11DE, 0x6120,
pci_index, &pci_bus, &pci_device_fn)
== PCIBIOS_SUCCESSFUL) {
found = 1;
} else {
break;
}

Then it reads the configuration of the card:

pcibios_read_config_dword(pci_bus, pci_device_fn,
PCI_BASE_ADDRESS_0, &pci_memaddr);
pcibios_read_config_byte(pci_bus, pci_device_fn,
PCI_INTERRUPT_LINE, &pci_irq);
printk(KERN_INFO "Found: Zoran, base-address: 0x%x,"
" irq: 0x%x\n", pci_memaddr, pci_irq);

This prints out:

Found: Zoran, base-address: 0xfffff000, irq: 0x9

Note that this card has no IO space, just memory mapped IO. Unfortunately
I cannot find another cobalt driver that has the same setup ..

Anyway, then it remaps memory:

cs->hw.teles0.membase = (u_int) vremap(pci_memaddr, PAGE_SIZE);

And then it does some I/O. On the first IO try the kernel already hangs:

/* Initialize Zoran PCI controller */
---> writel(0x00000000, cs->hw.teles0.membase + 0x28);
writel(0x01000000, cs->hw.teles0.membase + 0x28);
writel(0x01000000, cs->hw.teles0.membase + 0x28);
writel(0x7BFFFFFF, cs->hw.teles0.membase + 0x2C);
writel(0x70000000, cs->hw.teles0.membase + 0x3C);
writel(0x61000000, cs->hw.teles0.membase + 0x40);

Now the strange thing is that if I printf cs->hw.teles0.membase after
the vremap, that it returns zero! And, if I just remove the vremap,
the kernel still hangs .. I've even tried changing the writel to
outl, that hangs as well (what do I know ..)

Now my guess is that the vremap fails since it return 0. Do you think
that is the case as well, and if so, WHY?

Changing the memory mapped IO address of the extension card
in arch/mips/cobalt/pci might help, so ..

I did this, so that the card's IO mem got mapped at 0x10108000, and
after vremap it showed up at c0005000. However after the first writel
the machine still hangs ..

Debug:
Found: Zoran, base-address: 0x10108000, irq: 0x9
After vremap:
HiSax: Teles PCI config irq:9 mem:c0005000 (isabase 0, mips_io_port_base a0000
000)

Mike.

-- 
Indifference will certainly be the downfall of mankind, but who cares?

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/