Re: Memory map/ioremap question

From: shannon loi (shannon_loi@yahoo.com)
Date: Thu Mar 09 2000 - 14:54:22 EST


> BTW, how did you obtain the pointer to the pci_dev
> structure (pdev)??
pdev = pci_find_class(PCI_CLASS_NETWORK_ETHERNET<<8,
pdev)
> Please insert the line below after this mapping and
> let us know its output:
HERE THEY ARE (these number make sense?)
dev->base_addr = 0xfe100000
myADpriv->Hwregs = 0c60241d0

> What's the kernel version you're currently using to
> debug this problem?
2.2.12-20smp

> You should add here:
> dev->base_addr &= PCI_BASE_ADDRESS_MEM_MASK;
I did so and IT SEEMS TO WORK!

Thanks a ton!

--- Linux Lists <lists@cyclades.com> wrote:
>
> 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
> > myADpriv->Hwregs = (struct myHwregs
> > *)ioremap(dev->base_addr, 0x4000);
> > readl(&Hwregs->someReg);
> > when I try to read the hardware registers, I
> either
> > get 0 back or the machine stops working (but not
> hang,

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
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:16 EST