1PCI_IOMAP_RANGE(9)         Public Functions Provided        PCI_IOMAP_RANGE(9)
2
3
4

NAME

6       pci_iomap_range - create a virtual mapping cookie for a PCI BAR
7

SYNOPSIS

9       void __iomem * pci_iomap_range(struct pci_dev * dev, int bar,
10                                      unsigned long offset,
11                                      unsigned long maxlen);
12

ARGUMENTS

14       dev
15           PCI device that owns the BAR
16
17       bar
18           BAR number
19
20       offset
21           map memory at the given offset in BAR
22
23       maxlen
24           max length of the memory to map
25

DESCRIPTION

27       Using this function you will get a __iomem address to your device BAR.
28       You can access it using ioread*() and iowrite*(). These functions hide
29       the details if this is a MMIO or PIO address space and will just do
30       what you expect from them in the correct way.
31
32       maxlen specifies the maximum length to map. If you want to get access
33       to the complete BAR from offset to the end, pass 0 here.
34

AUTHORS

36       Matthew Wilcox <matthew@wil.cx>
37           Author.
38
39       Alan Cox <alan@lxorguk.ukuu.org.uk>
40           Author.
41
43Kernel Hackers Manual 3.10         June 2019                PCI_IOMAP_RANGE(9)
Impressum