lkml.org 
[lkml]   [1999]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectUpdated Kernel 2.2.13 patch: Documentation/pci.txt
Date
Sorry about the multiple submissions. Seems when you're updating the
documentation, there is always that one more correction to be made.

Changes are from the 2.2.13 Documentation/pci.txt, assumes you haven't
applied my previous patch.

Added information about correctly accessing PCI I/O and memory space. Added
information about PCI interrupts and request_irq(). Added reference to
Documentation/IO-mapping.txt file.

My thanks to Jeff Garzik for acting as an informal editor.

Let me know if the patch doesn't apply cleanly.

-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.2.13/Documentation/pci.txt Tue Apr 28 16:22:04 1998
--- linux/Documentation/pci.txt Thu Nov 18 09:34:51 1999
***************
*** 51,56 ****
--- 51,80 ----
config space. You should use the values in the pci_dev structure as they might
have been remapped by the kernel.

+ If your PCI device uses PCI I/O space, you need to use the check_region(),
+ request_region() and release_region() routines. These prevent devices from
+ having conflicting I/O regions. You access your registers using the inb(),
+ inw(), inl(), outb(), outw(), or outl() routines passing the value of
+ (struct pci_dev *) dev->base_address[] masked by PCI_BASE_ADDRESS_IO_MASK
+ as the base address of your registers.
+
+ If your PCI device uses PCI memory space, use ioremap() to create a cookie
+ mapping to your PCI device. The mask (struct pci_dev *) dev->base_address[]
+ with PCI_BASE_ADDRESS_MEM_MASK before passing it into ioremap(). 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 architectures allow direct access
+ to PCI memory space from the kernel.
+
+ The IO-mapping.txt file has information about converting between the
+ various address spaces. People writing DMA device drivers should pay special
+ attention to this information.
+
+ PCI interrupt routines are always SA_SHIRQ and should use the value from
+ (struct pci_dev *) dev->irq field for the interrupt number passed into
+ request_irq(). Since it is a shared interrupt, you must also always pass a
+ unique dev_id to request_irq().
+
4. Obsolete functions
~~~~~~~~~~~~~~~~~~~~~
<linux/bios32.h> is obsolete and should not be included in new code.
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:2.432 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site