lkml.org 
[lkml]   [1999]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectresending patch: Documentation/pci.txt
Date
I sent this patch out on Nov 3, 1999. Looking at the lastest documentation
available on kernelnotes.org, it didn't get applied.

I'm resending it, hopefully it will not get discarded again.

I put this together after a lot of discussion on this list about what the
proper way of handling PCI initialization and access was. Since people told
me to fix the documentation rather than just complaining, that is exactly
what I'm attempting to do.

If there is something incorrect in what I wrote, please let me know. I am
not sure that the lines about
check_region()/request_region()/release_region() are correct, there don't
seem to be any PCI drivers doing this. I included it because Jeff Garzik and
Martin Mares both said it was needed.

-Bret

-------------------------------------------------------------
SBS Technologies, Connectivity Products
... solutions for real-time connectivity

Bret Indrelee, Engineer
SBS Technologies, Inc., Connectivity Products
1284 Corporate Center Drive, St. Paul MN 55121
Direct: (651) 905-4731
Main: (651) 905-4700 Fax: (651) 905-4701
E-mail: bindrelee@sbs-cp.com http://www.sbs.com
-------------------------------------------------------------

--- linux-2.3.24/Documentation/pci.txt Fri Oct 15 20:55:26 1999
+++ linux/Documentation/pci.txt Wed Nov 3 14:49:16 1999
@@ -73,6 +73,25 @@
config space. You should use the values in the pci_dev structure as they might
have been remapped by the kernel.

+ You still need to use the check_region(), request_region() and
+release_region() routines for PCI I/O space and check_mem_region(),
+request_mem_region() and release_mem_region() for PCI memory space.
+
+ Once you have the regions allocated, you use ioremap() to create
+a cookie, passing in the proper base_address[] from the struct pci_dev.
+This cookie is passed to the readb(), readw(), readl(), writeb(),
+writew(), and writel() routines when accessing PCI space. You must
+always use these routines when accessing PCI space from the kernel.
+Not all architechures allow memory-mapped access to PCI memory from
+the kernel.
+
+ DMA device drivers should review the IO-mapping.txt file for
+information about converting between the various address spaces.
+
+ PCI interrupt routines are always SA_SHIRQ and should use the
+(struct pci_dev *) dev->irq field for the interrupt number passed
+into request_irq().
+
5. Other interesting functions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pci_find_slot() Find pci_dev corresponding to given bus and
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.057 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site