PCI confusion

Matt Porter mporter at mvista.com
Fri Mar 9 01:54:35 EST 2001


On Thu, Mar 08, 2001 at 06:01:29AM -0700, Matt Porter wrote:
> > 3. the driver I am using for testing (for the Tundra Universe) uses
> >   the following construction:
> >   baseaddr = ioremap(pci_resource_start(uni_pci_dev,0),
> > 		pci_resource_len (uni_pci_dev, 0));
> >   Then request_mem_region() for the same resources.
> >    Then pci_enable_device()
> >    Then pci_set_master()
> >    After this a access: temp = readl(baseaddr) will generate
> >    an Oops with illegal access....
> >   What am I doing wrong ?
>
> Also be sure that pci_mem_offset is 0x80000000 in the case of your
> memory map.  Otherwise, virt_to_bus() and the pci DMA API will not
> generate appropriate PCI mem master addresses for your devices to
> use.

Arg...that should be pci_dram_offset, of course.

--
Matt Porter
MontaVista Software, Inc.
mporter at mvista.com

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/






More information about the Linuxppc-dev mailing list