diff options
author | Denys Dmytriyenko <denys@ti.com> | 2012-06-11 20:44:56 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2012-06-11 20:44:56 -0400 |
commit | 88867c1d96684925027a0ecc9e25c6ea70040cc6 (patch) | |
tree | e1ad8651aa7663850f6dc1108b278f56a2b92a91 /extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch | |
parent | a1e2573369c6714956af561523ba274aa9c185f7 (diff) | |
download | meta-ti-split.tar.gz |
extras: move things to extrassplit
Move non-essential, outdated, best-effort pieces, as well, as those requiring
extra non-standard dependencies besides oe-core.
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch new file mode 100644 index 00000000..53fe6219 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/cam/0019-omap3isp-core-Do-smarter-MCLK-setting.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From 97761e2bdf286662e3c96f5a24fe568cac98fc9b Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergio Aguirre <saaguirre@ti.com> | ||
3 | Date: Wed, 25 Nov 2009 12:30:46 -0600 | ||
4 | Subject: [PATCH 19/75] omap3isp: core: Do smarter MCLK setting | ||
5 | |||
6 | Since the ratio between MCLK and DPLL4_M5 could not be 1:1 | ||
7 | (i.e. on 3430 its 2:1), it's necessary to check ratio | ||
8 | between those 2 first. | ||
9 | |||
10 | This should make MCLK setting more adequate to different | ||
11 | chipsets. | ||
12 | |||
13 | Tested on Zoom2 (3430 ES3.1) | ||
14 | |||
15 | Signed-off-by: Sergio Aguirre <saaguirre@ti.com> | ||
16 | --- | ||
17 | drivers/media/video/isp/isp.c | 13 ++++++++++++- | ||
18 | 1 files changed, 12 insertions(+), 1 deletions(-) | ||
19 | |||
20 | diff --git a/drivers/media/video/isp/isp.c b/drivers/media/video/isp/isp.c | ||
21 | index cf68720..29dd005 100644 | ||
22 | --- a/drivers/media/video/isp/isp.c | ||
23 | +++ b/drivers/media/video/isp/isp.c | ||
24 | @@ -2353,8 +2353,19 @@ int isp_enable_mclk(struct device *dev) | ||
25 | { | ||
26 | struct isp_device *isp = dev_get_drvdata(dev); | ||
27 | int r; | ||
28 | + unsigned long curr_mclk, curr_dpll4_m5, ratio; | ||
29 | |||
30 | - r = clk_set_rate(isp->dpll4_m5_ck, isp->mclk); | ||
31 | + /* Check ratio between DPLL4_M5 and CAM_MCLK */ | ||
32 | + curr_mclk = clk_get_rate(isp->cam_mclk); | ||
33 | + curr_dpll4_m5 = clk_get_rate(isp->dpll4_m5_ck); | ||
34 | + | ||
35 | + /* Protection for potential Zero division, or zero-ratio result */ | ||
36 | + if (!curr_mclk || !curr_dpll4_m5) | ||
37 | + BUG(); | ||
38 | + | ||
39 | + ratio = curr_mclk / curr_dpll4_m5; | ||
40 | + | ||
41 | + r = clk_set_rate(isp->dpll4_m5_ck, isp->mclk / ratio); | ||
42 | if (r) { | ||
43 | dev_err(dev, "clk_set_rate for dpll4_m5_ck failed\n"); | ||
44 | return r; | ||
45 | -- | ||
46 | 1.6.6.1 | ||
47 | |||