diff options
author | Liu Ying <b17645@freescale.com> | 2010-04-09 13:48:53 -0400 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-25 11:20:23 +0200 |
commit | 967a7c38f2d73021605cbb2ecf9be82e44074a6a (patch) | |
tree | 78ab563bf2c5a86e4ec580b58a9ea043e9e6aa16 /drivers/media | |
parent | 583a080e0198fdc8555c3cc72e6c18fea6792f23 (diff) |
ENGR00122388-2 V4L2 capture:Support camera's MCLK from SSI_EXT1_CLK
This patch supports camera's MCLK be derived from SSI_EXT1_CLK.
Signed-off-by: Liu Ying <b17645@freescale.com
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/mxc/capture/sensor_clock.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/media/video/mxc/capture/sensor_clock.c b/drivers/media/video/mxc/capture/sensor_clock.c index c15cf27c57cd..3d1bf8d71019 100644 --- a/drivers/media/video/mxc/capture/sensor_clock.c +++ b/drivers/media/video/mxc/capture/sensor_clock.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2004-2010 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -23,6 +23,7 @@ #include <linux/types.h> #include <linux/device.h> #include <linux/clk.h> +#include <mach/hardware.h> #if defined(CONFIG_MXC_IPU_V1) || defined(CONFIG_VIDEO_MXC_EMMA_CAMERA) \ || defined(CONFIG_VIDEO_MXC_CSI_CAMERA_MODULE) \ @@ -62,13 +63,22 @@ void set_mclk_rate(uint32_t *p_mclk_freq, uint32_t csi) uint32_t freq = 0; char *mclk; - if (csi == 0) { - mclk = "csi_mclk1"; - } else if (csi == 1) { - mclk = "csi_mclk2"; + if (cpu_is_mx53()) { + if (csi == 0) + mclk = "ssi_ext1_clk"; + else { + pr_err("invalid csi num %d\n", csi); + return; + } } else { - pr_debug("invalid csi num %d\n", csi); - return; + if (csi == 0) { + mclk = "csi_mclk1"; + } else if (csi == 1) { + mclk = "csi_mclk2"; + } else { + pr_err("invalid csi num %d\n", csi); + return; + } } clk = clk_get(NULL, mclk); |