[Top] [All Lists]

Re: troubles mmaping PCI device on Au1550

To: Clem Taylor <>
Subject: Re: troubles mmaping PCI device on Au1550
From: Dan Malek <>
Date: Tue, 12 Apr 2005 11:22:24 -0400
In-reply-to: <>
Original-recipient: rfc822;
References: <>

On Apr 10, 2005, at 6:16 PM, Clem Taylor wrote:

My driver code has something like:
remap_pfn_range ( vma, vma->vm_start,
     ( pci_resource_start ( pdev, BAR ) >> PAGE_SHIFT ) + vma->pgoff,
     vma->vm_end - vma->vm_start, vma->vm_page_prot );

The Au15xx uses 36-bit addressing for the PCI (among other) physical
addresses.  The mmap() in your driver is the right thing, but you need
to use io_remap_page_range() where the 2nd parameter is a phys_t.
Your offset should be a phys_t type, and pci_resource_start() also
returns a phys_t.

I tried a similar test using /dev/mem and the address the linear
framebuffer on my desktop machine (as returned by lspci).

You can't use /dev/mem for this on Au15xx because it doesn't have
provisions for more than 32-bit addresses.  Be careful with lspci,
as it only returns the 32-bit BAR, not the 36-bit Au15xx address nor
the 32-bit ioremapped address.


        -- Dan

<Prev in Thread] Current Thread [Next in Thread>