]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[MIPS] Fix build error on processors that don's support copy-on-write.
authorRalf Baechle <ralf@linux-mips.org>
Tue, 28 Feb 2006 17:04:20 +0000 (17:04 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 28 Feb 2006 17:04:20 +0000 (17:04 +0000)
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/lib/iomap.c
include/asm-mips/io.h

index 7e2ced715cfbdc4e1f925898a5df1c177b8bf005..f4ac5bbcd81f17441a559c471d4615497514f5f8 100644 (file)
@@ -63,7 +63,7 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
                return ioport_map(start, len);
        if (flags & IORESOURCE_MEM) {
                if (flags & IORESOURCE_CACHEABLE)
-                       return ioremap_cacheable_cow(start, len);
+                       return ioremap_cachable(start, len);
                return ioremap_nocache(start, len);
        }
 
index 5a4c8a54b8f43801755e43b9b8a7b92cb35fb79a..8c011aa61afaa1711311cd09282f9e8f75730238 100644 (file)
@@ -282,6 +282,24 @@ static inline void __iomem * __ioremap_mode(phys_t offset, unsigned long size,
 #define ioremap_nocache(offset, size)                                  \
        __ioremap_mode((offset), (size), _CACHE_UNCACHED)
 
+/*
+ * ioremap_cachable -   map bus memory into CPU space
+ * @offset:         bus address of the memory
+ * @size:           size of the resource to map
+ *
+ * ioremap_nocache performs a platform specific sequence of operations to
+ * make bus memory CPU accessible via the readb/readw/readl/writeb/
+ * writew/writel functions and the other mmio helpers. The returned
+ * address is not guaranteed to be usable directly as a virtual
+ * address.
+ *
+ * This version of ioremap ensures that the memory is marked cachable by
+ * the CPU.  Also enables full write-combining.  Useful for some
+ * memory-like regions on I/O busses.
+ */
+#define ioremap_cachable(offset, size)                                 \
+       __ioremap_mode((offset), (size), PAGE_CACHABLE_DEFAULT)
+
 /*
  * These two are MIPS specific ioremap variant.  ioremap_cacheable_cow
  * requests a cachable mapping, ioremap_uncached_accelerated requests a