Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196765
b: refs/heads/master
c: ac01bb7
h: refs/heads/master
i:
  196763: 91d1b58
v: v3
  • Loading branch information
Kishore Y authored and Tomi Valkeinen committed May 18, 2010
1 parent caa69bf commit 96b6d3a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c59ff5501e5a37d36f232e757c961ced12eb99f
refs/heads/master: ac01bb7ea06a02c8dc9084b4ed59cb59efeceb39
24 changes: 19 additions & 5 deletions trunk/drivers/video/omap2/dss/dss.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,13 @@ void dss_dump_clocks(struct seq_file *s)

seq_printf(s, "dpll4_ck %lu\n", dpll4_ck_rate);

seq_printf(s, "dss1_alwon_fclk = %lu / %lu * 2 = %lu\n",
if (cpu_is_omap3630())
seq_printf(s, "dss1_alwon_fclk = %lu / %lu = %lu\n",
dpll4_ck_rate,
dpll4_ck_rate / dpll4_m4_ck_rate,
dss_clk_get_rate(DSS_CLK_FCK1));
else
seq_printf(s, "dss1_alwon_fclk = %lu / %lu * 2 = %lu\n",
dpll4_ck_rate,
dpll4_ck_rate / dpll4_m4_ck_rate,
dss_clk_get_rate(DSS_CLK_FCK1));
Expand Down Expand Up @@ -293,7 +299,8 @@ int dss_calc_clock_rates(struct dss_clock_info *cinfo)
{
unsigned long prate;

if (cinfo->fck_div > 16 || cinfo->fck_div == 0)
if (cinfo->fck_div > (cpu_is_omap3630() ? 32 : 16) ||
cinfo->fck_div == 0)
return -EINVAL;

prate = clk_get_rate(clk_get_parent(dss.dpll4_m4_ck));
Expand Down Expand Up @@ -329,7 +336,10 @@ int dss_get_clock_div(struct dss_clock_info *cinfo)
if (cpu_is_omap34xx()) {
unsigned long prate;
prate = clk_get_rate(clk_get_parent(dss.dpll4_m4_ck));
cinfo->fck_div = prate / (cinfo->fck / 2);
if (cpu_is_omap3630())
cinfo->fck_div = prate / (cinfo->fck);
else
cinfo->fck_div = prate / (cinfo->fck / 2);
} else {
cinfo->fck_div = 0;
}
Expand Down Expand Up @@ -402,10 +412,14 @@ int dss_calc_clock_div(bool is_tft, unsigned long req_pck,

goto found;
} else if (cpu_is_omap34xx()) {
for (fck_div = 16; fck_div > 0; --fck_div) {
for (fck_div = (cpu_is_omap3630() ? 32 : 16);
fck_div > 0; --fck_div) {
struct dispc_clock_info cur_dispc;

fck = prate / fck_div * 2;
if (cpu_is_omap3630())
fck = prate / fck_div;
else
fck = prate / fck_div * 2;

if (fck > DISPC_MAX_FCK)
continue;
Expand Down

0 comments on commit 96b6d3a

Please sign in to comment.