On Mon, Dec 13, 1999 at 09:11:05PM -0500, Stephane Bouchard wrote:
> Hi,
>
> I want to make a PCI driver, I try to map the pci addresses of my computer.
> I actually try to used the file pci.c and pci.h to do this but... have a no
> doc on the subject. If a person have a good example of a PCI driver
> [complete and comment!], I am interest to look at this code.
>
There are a bunch of then in the kernel. Basically, you need to
search for your device on the pci_devices linked list, then do
something like:
phys_addr = device->base_address[0];
offset = phys_addr & ~PAGE_MASK;
io_addr = ioremap(phys_addr & PAGE_MASK,DEVICE_IO_SIZE)+offset;
And then use read[bwl]() and write[bwl]() to access the device using
the io_addr address.
dave...
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/