diff options
author | Jonas Bonn <jonas@southpole.se> | 2011-07-02 11:23:29 -0400 |
---|---|---|
committer | Jonas Bonn <jonas@southpole.se> | 2011-07-22 12:46:26 -0400 |
commit | 82ed223c264def2b15ee4bec2e8c3048092ceb5f (patch) | |
tree | 5db30cfb6bb60ce5914128ebe342f08257688aac /include/asm-generic/iomap.h | |
parent | f1ecc69838a2d7c8a3e1909f637d4083c071777d (diff) |
iomap: make IOPORT/PCI mapping functions conditional
Use the CONFIG_HAS_IOPORT and CONFIG_PCI options to decide whether or
not functions for mapping these areas are provided.
Signed-off-by: Jonas Bonn <jonas@southpole.se>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/asm-generic/iomap.h')
-rw-r--r-- | include/asm-generic/iomap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h index 76b0cc5637f8..c74ef2c6e633 100644 --- a/include/asm-generic/iomap.h +++ b/include/asm-generic/iomap.h | |||
@@ -56,17 +56,21 @@ extern void iowrite8_rep(void __iomem *port, const void *buf, unsigned long coun | |||
56 | extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count); | 56 | extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count); |
57 | extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count); | 57 | extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count); |
58 | 58 | ||
59 | #ifdef CONFIG_HAS_IOPORT | ||
59 | /* Create a virtual mapping cookie for an IO port range */ | 60 | /* Create a virtual mapping cookie for an IO port range */ |
60 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | 61 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); |
61 | extern void ioport_unmap(void __iomem *); | 62 | extern void ioport_unmap(void __iomem *); |
63 | #endif | ||
62 | 64 | ||
63 | #ifndef ARCH_HAS_IOREMAP_WC | 65 | #ifndef ARCH_HAS_IOREMAP_WC |
64 | #define ioremap_wc ioremap_nocache | 66 | #define ioremap_wc ioremap_nocache |
65 | #endif | 67 | #endif |
66 | 68 | ||
69 | #ifdef CONFIG_PCI | ||
67 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | 70 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ |
68 | struct pci_dev; | 71 | struct pci_dev; |
69 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | 72 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); |
70 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | 73 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); |
74 | #endif | ||
71 | 75 | ||
72 | #endif | 76 | #endif |