|
@@ -12,6 +12,8 @@
|
|
|
#ifndef _ASM_IO_H
|
|
|
#define _ASM_IO_H
|
|
|
|
|
|
+#define ARCH_HAS_IOREMAP_WC
|
|
|
+
|
|
|
#include <linux/compiler.h>
|
|
|
#include <linux/kernel.h>
|
|
|
#include <linux/types.h>
|
|
@@ -277,6 +279,27 @@ static inline void __iomem * __ioremap_mode(phys_addr_t offset, unsigned long si
|
|
|
__ioremap_mode((offset), (size), _page_cachable_default)
|
|
|
#define ioremap_cache ioremap_cachable
|
|
|
|
|
|
+/*
|
|
|
+ * ioremap_wc - map bus memory into CPU space
|
|
|
+ * @offset: bus address of the memory
|
|
|
+ * @size: size of the resource to map
|
|
|
+ *
|
|
|
+ * ioremap_wc 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 uncachable
|
|
|
+ * but accelerated by means of write-combining feature. It is specifically
|
|
|
+ * useful for PCIe prefetchable windows, which may vastly improve a
|
|
|
+ * communications performance. If it was determined on boot stage, what
|
|
|
+ * CPU CCA doesn't support UCA, the method shall fall-back to the
|
|
|
+ * _CACHE_UNCACHED option (see cpu_probe() method).
|
|
|
+ */
|
|
|
+#define ioremap_wc(offset, size) \
|
|
|
+ __ioremap_mode((offset), (size), boot_cpu_data.writecombine)
|
|
|
+
|
|
|
/*
|
|
|
* These two are MIPS specific ioremap variant. ioremap_cacheable_cow
|
|
|
* requests a cachable mapping, ioremap_uncached_accelerated requests a
|