Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20987
b: refs/heads/master
c: 8e65098
h: refs/heads/master
i:
  20985: dc2dbd0
  20983: 915cf3f
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Mar 11, 2006
1 parent 7c8a086 commit b07a8ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: 54243cefdd3ab8133ebe7d3d705f35ca1d0b59eb
refs/heads/master: 8e6509876c5cb079f56dbe334aafaae9a293c886
7 changes: 4 additions & 3 deletions trunk/drivers/video/aty/aty128fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
unsigned char post_dividers[] = {1,2,4,8,3,6,12};
u32 output_freq;
u32 vclk; /* in .01 MHz */
int i;
int i = 0;
u32 n, d;

vclk = 100000000 / period_in_ps; /* convert units to 10 kHz */
Expand All @@ -1340,15 +1340,16 @@ static int aty128_var_to_pll(u32 period_in_ps, struct aty128_pll *pll,
/* now, find an acceptable divider */
for (i = 0; i < sizeof(post_dividers); i++) {
output_freq = post_dividers[i] * vclk;
if (output_freq >= c.ppll_min && output_freq <= c.ppll_max)
if (output_freq >= c.ppll_min && output_freq <= c.ppll_max) {
pll->post_divider = post_dividers[i];
break;
}
}

/* calculate feedback divider */
n = c.ref_divider * output_freq;
d = c.ref_clk;

pll->post_divider = post_dividers[i];
pll->feedback_divider = round_div(n, d);
pll->vclk = vclk;

Expand Down

0 comments on commit b07a8ba

Please sign in to comment.