summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2010-11-02 13:45:08 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2012-02-02 16:59:07 +0800
commitd5caa405118236b2829e873e1b61a8ae34a29456 (patch)
treef9e28543f1571ffea5aba2215e54ebdd5e744ca8 /drivers
parent599a980adc5c2ba32f6aedcd87640b781d347d1f (diff)
ENGR00133687 Android pmem: change the noncached buffer prot to writecombine.
Workaround for imx5x M4IF burst len errata when armv7 neon enabled: if the burst len > 8bytes, access the strongly ordered memory, the result is not correct. Use pgprot_writecombine to map the memory to uncached and normal memory type, instead of pgprot_noncached which maps to strongly ordered memory, to avoid burst len > 8. Signed-off-by: Hu Hui <b29976@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/pmem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/misc/pmem.c b/drivers/misc/pmem.c
index abb73c143164..bfce8996121a 100644
--- a/drivers/misc/pmem.c
+++ b/drivers/misc/pmem.c
@@ -1,6 +1,7 @@
/* drivers/android/pmem.c
*
* Copyright (C) 2007 Google, Inc.
+ * Copyright (C) 2011 Freescale Semiconductor, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -442,9 +443,9 @@ static int pmem_allocate(int id, unsigned long len)
static pgprot_t pmem_access_prot(struct file *file, pgprot_t vma_prot)
{
int id = get_id(file);
-#ifdef pgprot_noncached
+#ifdef pgprot_writecombine
if (pmem[id].cached == 0 || file->f_flags & O_SYNC)
- return pgprot_noncached(vma_prot);
+ return pgprot_writecombine(vma_prot);
#endif
#ifdef pgprot_ext_buffered
else if (pmem[id].buffered)