[PATCH 22/133] [Jaunty SRU] ARM.imx51 Freescale:ENGR00109633 V4L2 capture: Fix enable/disable ov3640 camera's mclk issue
Brad Figg
brad.figg at canonical.com
Thu Jul 9 16:48:12 UTC 2009
From: Liu Ying <b17645 at freescale.com>
Remove unusable logic to check if camera's mclk is enabled or disabled before.
Clock frame work will record the clock's use count.
This makes the disabling logic be right if two capture features
are run simultanesouly.
Signed-off-by: Liu Ying <b17645 at freescale.com>
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
drivers/mxc/ipu3/ipu_capture.c | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
mode change 100644 => 100755 drivers/mxc/ipu3/ipu_capture.c
diff --git a/drivers/mxc/ipu3/ipu_capture.c b/drivers/mxc/ipu3/ipu_capture.c
old mode 100644
new mode 100755
index 5a7ad71..256fb9a
--- a/drivers/mxc/ipu3/ipu_capture.c
+++ b/drivers/mxc/ipu3/ipu_capture.c
@@ -30,8 +30,6 @@
#include "ipu_prv.h"
#include "ipu_regs.h"
-static bool gipu_csi_get_mclk_flag[2] = {false, false};
-
/*!
* ipu_csi_init_interface
* Sets initial values for the CSI registers.
@@ -174,24 +172,11 @@ int _ipu_csi_mclk_set(uint32_t pixel_clk, uint32_t csi)
int ipu_csi_enable_mclk(int csi, bool flag, bool wait)
{
if (flag) {
- if (gipu_csi_get_mclk_flag[csi] == true) {
- printk(KERN_WARNING "The clock of CSI%d has been enabled\n", csi);
- return 0;
- }
-
clk_enable(g_csi_clk[csi]);
if (wait == true)
msleep(10);
- gipu_csi_get_mclk_flag[csi] = true;
- } else {
- if (gipu_csi_get_mclk_flag[csi] == false) {
- printk(KERN_WARNING "The clock of CSI%d has been disabled\n", csi);
- return 0;
- }
-
+ } else
clk_disable(g_csi_clk[csi]);
- gipu_csi_get_mclk_flag[csi] = false;
- }
return 0;
}
--
1.6.0.4
More information about the kernel-team
mailing list