On Wed, 8 Mar 2000, shannon loi wrote:
>
> I did this:
> #if (LINUX_VERSION_CODE < 0x02030d)
> dev->base_addr = pdev->base_address[0];
You should add here:
dev->base_addr &= PCI_BASE_ADDRESS_MEM_MASK;
, only on this part of the "#if" clause.
> #else
> dev->base_addr = pdev->resource[0].start;
> #endif
BTW, how did you obtain the pointer to the pci_dev structure (pdev)??
> myADpriv->Hwregs = (struct myHwregs
> *)ioremap(dev->base_addr, 0x4000);
Please insert the line below after this mapping and let us know its
output:
printk("PCI=0x%lx, VIRT=0x%lx\n",
dev->base_addr, (unsigned long)myADpriv->Hwregs);
> readl(&Hwregs->someReg);
>
> when I try to read the hardware registers, I either
> get 0 back or the machine stops working (but not hang,
> I can telnet). Did I miss something/do something
> wrong? what should I try differently?
What's the kernel version you're currently using to debug this problem?
Regards,
Ivan
-
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/
This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:14 EST