pci_iomap(9)

pci_iomap9

Create a virtual mapping cookie for a pci bar

Usage

void __iomem * pci_iomap(struct pci_dev * dev, int bar, unsigned long maxlen);

Arguments

dev

PCI device that owns the BAR

bar

BAR number

maxlen

length of the memory to map

Overview

Using this function you will get a __iomem address to your device BAR. You can access it using ioread*() and iowrite*(). These functions hide the details if this is a MMIO or PIO address space and will just do what you expect from them in the correct way.

maxlen specifies the maximum length to map. If you want to get access to the complete BAR without checking for its length first, pass 0 here.

Releases

6 releases since Debian 4.0 (Etch); the text changed 5 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9

Authors

Matthew Wilcox <[email protected]>

Author.

Alan Cox <[email protected]>

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.