summaryrefslogtreecommitdiff
path: root/drivers/mxc/vpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mxc/vpu')
-rw-r--r--drivers/mxc/vpu/Kconfig8
-rw-r--r--drivers/mxc/vpu/mxc_vpu.c12
2 files changed, 6 insertions, 14 deletions
diff --git a/drivers/mxc/vpu/Kconfig b/drivers/mxc/vpu/Kconfig
index 37e55e03d2f2..144a4c20b26f 100644
--- a/drivers/mxc/vpu/Kconfig
+++ b/drivers/mxc/vpu/Kconfig
@@ -12,14 +12,6 @@ config MXC_VPU
The VPU codec device provides codec function for H.264/MPEG4/H.263,
as well as MPEG2/VC-1/DivX on some platforms.
-config MXC_VPU_IRAM
- tristate "Use IRAM as temporary buffer for VPU to enhance performace"
- depends on (ARCH_MX37 || ARCH_MX5)
- default y
- ---help---
- The VPU can use internal RAM as temporary buffer to save external
- memroy bandwith, thus to enhance video performance.
-
config MXC_VPU_DEBUG
bool "MXC VPU debugging"
depends on MXC_VPU != n
diff --git a/drivers/mxc/vpu/mxc_vpu.c b/drivers/mxc/vpu/mxc_vpu.c
index 67b9ebbdca42..0c202c0fa806 100644
--- a/drivers/mxc/vpu/mxc_vpu.c
+++ b/drivers/mxc/vpu/mxc_vpu.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2006-2010 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2006-2011 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -593,13 +593,13 @@ static int vpu_dev_probe(struct platform_device *pdev)
vpu_plat = pdev->dev.platform_data;
- if (VPU_IRAM_SIZE)
- iram_alloc(VPU_IRAM_SIZE, &addr);
+ if (vpu_plat && vpu_plat->iram_enable && vpu_plat->iram_size)
+ iram_alloc(vpu_plat->iram_size, &addr);
if (addr == 0)
iram.start = iram.end = 0;
else {
iram.start = addr;
- iram.end = addr + VPU_IRAM_SIZE - 1;
+ iram.end = addr + vpu_plat->iram_size - 1;
}
if (cpu_is_mx32()) {
@@ -682,8 +682,8 @@ static int vpu_dev_remove(struct platform_device *pdev)
destroy_workqueue(vpu_data.workqueue);
iounmap(vpu_base);
- if (VPU_IRAM_SIZE)
- iram_free(iram.start, VPU_IRAM_SIZE);
+ if (vpu_plat && vpu_plat->iram_enable && vpu_plat->iram_size)
+ iram_free(iram.start, vpu_plat->iram_size);
return 0;
}