diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2012-01-30 00:20:48 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2012-01-31 23:19:47 +0200 |
commit | b923650b84068b74b6df838aa8f9b2a350171de6 (patch) | |
tree | d6d366da5427816210dc15c7c401e4a7910092c4 /include/asm-generic | |
parent | 0a9626575400879d1d5e6bc8768188b938d7c501 (diff) | |
download | linux-3.10-b923650b84068b74b6df838aa8f9b2a350171de6.tar.gz linux-3.10-b923650b84068b74b6df838aa8f9b2a350171de6.tar.bz2 linux-3.10-b923650b84068b74b6df838aa8f9b2a350171de6.zip |
lib: add NO_GENERIC_PCI_IOPORT_MAP
Some architectures need to override the way
IO port mapping is done on PCI devices.
Supply a generic macro that calls
ioport_map, and make it possible for architectures
to override.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/pci_iomap.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-generic/pci_iomap.h b/include/asm-generic/pci_iomap.h index 8de4b73e19e..e58fcf89137 100644 --- a/include/asm-generic/pci_iomap.h +++ b/include/asm-generic/pci_iomap.h @@ -15,6 +15,16 @@ struct pci_dev; #ifdef CONFIG_PCI /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); +/* Create a virtual mapping cookie for a port on a given PCI device. + * Do not call this directly, it exists to make it easier for architectures + * to override */ +#ifdef CONFIG_NO_GENERIC_PCI_IOPORT_MAP +extern void __iomem *__pci_ioport_map(struct pci_dev *dev, unsigned long port, + unsigned int nr); +#else +#define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr)) +#endif + #else static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) { |