summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2011-12-14 10:31:27 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2012-02-02 16:59:08 +0800
commit6e546c959f6a85bef158c6eb4bce722f4a136472 (patch)
tree1173bba99477d7c7efcf746d5f6fd04c1f2e56e4 /drivers/misc
parente82b3551dd9760ff5a422667a8373f0ae9d38745 (diff)
ENGR00170215 pmem: remove ioremap for virtual address
ioremapped virtual address is only used by kenrel drivers who need to access pmem. But on our platform, we never have such use case. So remove this ioremap to save the vmalloc virtual kernel spaces for lowmem mapping. Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/pmem.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/misc/pmem.c b/drivers/misc/pmem.c
index c694f24a67d2..3027618a6a9f 100644
--- a/drivers/misc/pmem.c
+++ b/drivers/misc/pmem.c
@@ -105,8 +105,10 @@ struct pmem_info {
struct miscdevice dev;
/* physical start address of the remaped pmem space */
unsigned long base;
+#ifdef PMEM_VADDR_SUPPORT
/* vitual start address of the remaped pmem space */
unsigned char __iomem *vbase;
+#endif
/* total size of the pmem space */
unsigned long size;
/* number of entries in the pmem space */
@@ -471,10 +473,17 @@ static unsigned long pmem_start_addr(int id, struct pmem_data *data)
}
+#ifdef PMEM_VADDR_SUPPORT
static void *pmem_start_vaddr(int id, struct pmem_data *data)
{
return pmem_start_addr(id, data) - pmem[id].base + pmem[id].vbase;
}
+#else
+static void *pmem_start_vaddr(int id, struct pmem_data *data)
+{
+ return 0;
+}
+#endif
static unsigned long pmem_len(int id, struct pmem_data *data)
{
@@ -1273,6 +1282,7 @@ int pmem_setup(struct android_pmem_platform_data *pdata,
}
}
+#ifdef PMEM_VADDR_SUPPORT
if (pmem[id].cached)
pmem[id].vbase = ioremap_cached(pmem[id].base,
pmem[id].size);
@@ -1286,6 +1296,7 @@ int pmem_setup(struct android_pmem_platform_data *pdata,
if (pmem[id].vbase == 0)
goto error_cant_remap;
+#endif
pmem[id].garbage_pfn = page_to_pfn(alloc_page(GFP_KERNEL));
if (pmem[id].no_allocator)