public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
[parent not found: <mailman.995466971.12450.linux-kernel2news@redhat.com>]
* Right Semantics for ioremap, remap_page_range
@ 2001-07-18 11:36 Alexander Ehlert
  2001-07-18 12:40 ` Richard B. Johnson
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Ehlert @ 2001-07-18 11:36 UTC (permalink / raw)
  To: linux-kernel

Hi,

I'm currently trying to write a linux kernel driver for an experimental
graphics board we're developing at our institute. It's fitted
with an plx9054 and got some sdram on board connected to the plx.
Now I come this far, that I actually detect the board, set some modes
and do an ioremap on pci_resource_start(pdev,2) which is the
base for 64Mb Ram Onboard. After ioremap() I actually like
to do remap_page_range through fileops/mmap call. I just copied
that code from drivers/char/mem.c, but just using the ioremapped
address as offset in remap_page_range, doesn't seem to work, instead
I think I just mmap some totally different area... Now, what do I have to
use for that offset? What I currently do in the init function is
something like that:

...
priv.pcibar2 = (char*)ioremap(pci_resource_start(pdev,2),
                              pci_resource_len(pdev,2));
...

and later on in the mmap method I do:

static int mmap_plx9054(file, vma) {
unsigned long pcibase = (unsigned long)priv.pcibar2;
...
remap_page_range(vma->vma_start, pcibase, len, vma->vm_page_prot);
...
}

I just use pcibase as offset, anything wrong here?

Cheers, Alex

PS: Is there someone who knows about the plx9054?

-- 

Small things make base men proud.
		-- William Shakespeare, "Henry VI"



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-07-18 19:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.995456342.9505.linux-kernel2news@redhat.com>
2001-07-18 19:16 ` Right Semantics for ioremap, remap_page_range Pete Zaitcev
     [not found] <mailman.995466971.12450.linux-kernel2news@redhat.com>
2001-07-18 19:19 ` Pete Zaitcev
2001-07-18 11:36 Alexander Ehlert
2001-07-18 12:40 ` Richard B. Johnson
2001-07-18 12:52   ` Alexander Ehlert
2001-07-18 14:34     ` Martin Frey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox