Thread (1 message) 1 message, 1 author, 2001-03-08
  • (off-list ancestor, not in this archive)
  • Re: PCI confusion · Matt Porter <hidden> · 2001-03-08

Re: PCI confusion

From: Matt Porter <hidden>
Date: 2001-03-08 14:54:35

On Thu, Mar 08, 2001 at 06:01:29AM -0700, Matt Porter wrote:
quoted
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@mvista.com

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help