aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorKishore Y <kishore.y@ti.com>2010-04-25 06:57:19 -0400
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-05-18 08:06:06 -0400
commitac01bb7ea06a02c8dc9084b4ed59cb59efeceb39 (patch)
treeaaaf385ac6b09c8aa212068a0c68a68b3dd92a38 /drivers/video
parent2c59ff5501e5a37d36f232e757c961ced12eb99f (diff)
OMAP3630: DSS2: Updating MAX divider value
In DPLL4 M3, M4, M5 and M6 field width has been increased by 1 bit in 3630. So the max divider value that can be achived will be 32 and not 16. In 3630 the functional clock is x1 of DPLL4 and not x2. Hence multiplier 2 is removed. Signed-off-by: Sudeep Basavaraj <sudeep.basavaraj@ti.com> Signed-off-by: Mukund Mittal <mmittal@ti.com> Signed-off-by: Kishore Y <kishore.y@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dss/dss.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
index 54344184dd73..24b18258654f 100644
--- a/drivers/video/omap2/dss/dss.c
+++ b/drivers/video/omap2/dss/dss.c
@@ -223,7 +223,13 @@ void dss_dump_clocks(struct seq_file *s)
223 223
224 seq_printf(s, "dpll4_ck %lu\n", dpll4_ck_rate); 224 seq_printf(s, "dpll4_ck %lu\n", dpll4_ck_rate);
225 225
226 seq_printf(s, "dss1_alwon_fclk = %lu / %lu * 2 = %lu\n", 226 if (cpu_is_omap3630())
227 seq_printf(s, "dss1_alwon_fclk = %lu / %lu = %lu\n",
228 dpll4_ck_rate,
229 dpll4_ck_rate / dpll4_m4_ck_rate,
230 dss_clk_get_rate(DSS_CLK_FCK1));
231 else
232 seq_printf(s, "dss1_alwon_fclk = %lu / %lu * 2 = %lu\n",
227 dpll4_ck_rate, 233 dpll4_ck_rate,
228 dpll4_ck_rate / dpll4_m4_ck_rate, 234 dpll4_ck_rate / dpll4_m4_ck_rate,
229 dss_clk_get_rate(DSS_CLK_FCK1)); 235 dss_clk_get_rate(DSS_CLK_FCK1));
@@ -293,7 +299,8 @@ int dss_calc_clock_rates(struct dss_clock_info *cinfo)
293{ 299{
294 unsigned long prate; 300 unsigned long prate;
295 301
296 if (cinfo->fck_div > 16 || cinfo->fck_div == 0) 302 if (cinfo->fck_div > (cpu_is_omap3630() ? 32 : 16) ||
303 cinfo->fck_div == 0)
297 return -EINVAL; 304 return -EINVAL;
298 305
299 prate = clk_get_rate(clk_get_parent(dss.dpll4_m4_ck)); 306 prate = clk_get_rate(clk_get_parent(dss.dpll4_m4_ck));
@@ -329,7 +336,10 @@ int dss_get_clock_div(struct dss_clock_info *cinfo)
329 if (cpu_is_omap34xx()) { 336 if (cpu_is_omap34xx()) {
330 unsigned long prate; 337 unsigned long prate;
331 prate = clk_get_rate(clk_get_parent(dss.dpll4_m4_ck)); 338 prate = clk_get_rate(clk_get_parent(dss.dpll4_m4_ck));
332 cinfo->fck_div = prate / (cinfo->fck / 2); 339 if (cpu_is_omap3630())
340 cinfo->fck_div = prate / (cinfo->fck);
341 else
342 cinfo->fck_div = prate / (cinfo->fck / 2);
333 } else { 343 } else {
334 cinfo->fck_div = 0; 344 cinfo->fck_div = 0;
335 } 345 }
@@ -402,10 +412,14 @@ retry:
402 412
403 goto found; 413 goto found;
404 } else if (cpu_is_omap34xx()) { 414 } else if (cpu_is_omap34xx()) {
405 for (fck_div = 16; fck_div > 0; --fck_div) { 415 for (fck_div = (cpu_is_omap3630() ? 32 : 16);
416 fck_div > 0; --fck_div) {
406 struct dispc_clock_info cur_dispc; 417 struct dispc_clock_info cur_dispc;
407 418
408 fck = prate / fck_div * 2; 419 if (cpu_is_omap3630())
420 fck = prate / fck_div;
421 else
422 fck = prate / fck_div * 2;
409 423
410 if (fck > DISPC_MAX_FCK) 424 if (fck > DISPC_MAX_FCK)
411 continue; 425 continue;