X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=include%2Fasm-generic%2Fiomap.h;h=98dcd76ce836db71243b031a2bdfc301627d7a03;hb=8ded371f81fba8b38a049f8c5f30ce6438fc7b75;hp=67dc84cd1343dd6d1674b64f2be832481f0ed072;hpb=ab1ecbabb1c7b1599b1eb70c291407c557ea4ef3;p=~andy%2Flinux diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h index 67dc84cd134..98dcd76ce83 100644 --- a/include/asm-generic/iomap.h +++ b/include/asm-generic/iomap.h @@ -56,13 +56,29 @@ extern void iowrite8_rep(void __iomem *port, const void *buf, unsigned long coun extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count); extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count); +#ifdef CONFIG_HAS_IOPORT /* Create a virtual mapping cookie for an IO port range */ extern void __iomem *ioport_map(unsigned long port, unsigned int nr); extern void ioport_unmap(void __iomem *); +#endif + +#ifndef ARCH_HAS_IOREMAP_WC +#define ioremap_wc ioremap_nocache +#endif +#ifdef CONFIG_PCI /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ struct pci_dev; extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); extern void pci_iounmap(struct pci_dev *dev, void __iomem *); +#else +struct pci_dev; +static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max) +{ + return NULL; +} +static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr) +{ } +#endif #endif