linux-mips
[Top] [All Lists]

mmap problem another :)

To: linux-mips@linux-mips.org
Subject: mmap problem another :)
From: Dmitriy Tochansky <toch@dfpost.ru>
Date: Thu, 9 Dec 2004 16:12:07 +0300
Organization: Special Technology Center
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Seems like I found problem.

Look ret = io_remap_page_range(start, offset, size, vma->vm_page_prot); remaps
from "offset" which I got from pci_resource_start (curdev, IOMEM0); its ok
from first board where it eq 0x40000000 but on second it 0x40002040

Then I'm reading from x = mmap (NULL, MMAP_SIZE, PROT_READ | PROT_WRITE, 
MAP_SHARED, fd, 0); with
shift 0x3C>>2 where I expect board register. But for second board x points to 
where?
0x40000000 or 0x40002040 or as I think remap_page_range or sonething realign 
offset to 
PAGE so x points to 0x40002000 or 0x40003000 and reading with shift 0x3C have 
no sense.

Am I rigth?

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