MTD: merge 3.18 development into -next development
[pandora-kernel.git] / arch / mips / include / asm / pgtable.h
index df49a30..d6d1928 100644 (file)
@@ -366,6 +366,16 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot)
        return __pgprot(prot);
 }
 
+static inline pgprot_t pgprot_writecombine(pgprot_t _prot)
+{
+       unsigned long prot = pgprot_val(_prot);
+
+       /* cpu_data[0].writecombine is already shifted by _CACHE_SHIFT */
+       prot = (prot & ~_CACHE_MASK) | cpu_data[0].writecombine;
+
+       return __pgprot(prot);
+}
+
 /*
  * Conversion functions: convert a page and protection to a page entry,
  * and a page entry and page directory to the page they refer to.