Updated Kernel 2.2.13 patch: Documentation/pci.txt

Bret Indrelee (bindrelee@sbs-cp.com)
Thu, 18 Nov 1999 10:53:49 -0600


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01BF31E5.7F2E7840
Content-Type: text/plain;
charset="iso-8859-1"

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
-------------------------------------------------------------

------_=_NextPart_000_01BF31E5.7F2E7840
Content-Type: text/plain;
name="pci-doc-patch.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="pci-doc-patch.txt"

*** linux-2.2.13/Documentation/pci.txt Tue Apr 28 16:22:04 1998=0A=
--- linux/Documentation/pci.txt Thu Nov 18 09:34:51 1999=0A=
***************=0A=
*** 51,56 ****=0A=
--- 51,80 ----=0A=
config space. You should use the values in the pci_dev structure as =
they might=0A=
have been remapped by the kernel.=0A=
=0A=
+ If your PCI device uses PCI I/O space, you need to use the =
check_region(),=0A=
+ request_region() and release_region() routines. These prevent devices =
from =0A=
+ having conflicting I/O regions. You access your registers using the =
inb(),=0A=
+ inw(), inl(), outb(), outw(), or outl() routines passing the value =
of=0A=
+ (struct pci_dev *) dev->base_address[] masked by =
PCI_BASE_ADDRESS_IO_MASK=0A=
+ as the base address of your registers.=0A=
+ =0A=
+ If your PCI device uses PCI memory space, use ioremap() to create =
a cookie =0A=
+ mapping to your PCI device. The mask (struct pci_dev *) =
dev->base_address[] =0A=
+ with PCI_BASE_ADDRESS_MEM_MASK before passing it into ioremap(). This =
cookie =0A=
+ is passed to the readb(), readw(), readl(), writeb(), writew(), and =
writel() =0A=
+ routines when accessing PCI space. You must always use these routines =
when =0A=
+ accessing PCI space from the kernel. Not all architectures allow =
direct access=0A=
+ to PCI memory space from the kernel.=0A=
+ =0A=
+ The IO-mapping.txt file has information about converting between =
the=0A=
+ various address spaces. People writing DMA device drivers should pay =
special=0A=
+ attention to this information.=0A=
+ =0A=
+ PCI interrupt routines are always SA_SHIRQ and should use the =
value from=0A=
+ (struct pci_dev *) dev->irq field for the interrupt number passed =
into =0A=
+ request_irq(). Since it is a shared interrupt, you must also always =
pass a =0A=
+ unique dev_id to request_irq().=0A=
+ =0A=
4. Obsolete functions=0A=
~~~~~~~~~~~~~~~~~~~~~=0A=
<linux/bios32.h> is obsolete and should not be included in new =
code.=0A=

------_=_NextPart_000_01BF31E5.7F2E7840--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/