Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43399
b: refs/heads/master
c: 5c894cd
h: refs/heads/master
i:
  43397: b793b52
  43395: da59b34
  43391: c5b2420
v: v3
  • Loading branch information
Pavel Pisa authored and Russell King committed Dec 7, 2006
1 parent 4ac934c commit 8243ae7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 9073341c2ba5d5e77b3d05d84cf9e3a16e8a7902
refs/heads/master: 5c894cd1c89fc10907febd93e6ef35cd3c65e25e
9 changes: 8 additions & 1 deletion trunk/arch/arm/mach-imx/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ EXPORT_SYMBOL(imx_gpio_mode);
*/
static unsigned int imx_decode_pll(unsigned int pll)
{
unsigned long long ll;
unsigned long quot;

u32 mfi = (pll >> 10) & 0xf;
u32 mfn = pll & 0x3ff;
u32 mfd = (pll >> 16) & 0x3ff;
Expand All @@ -112,7 +115,11 @@ static unsigned int imx_decode_pll(unsigned int pll)

mfi = mfi <= 5 ? 5 : mfi;

return (2 * (f_ref>>10) * ( (mfi<<10) + (mfn<<10) / (mfd+1) )) / (pd+1);
ll = 2 * (unsigned long long)f_ref * ( (mfi<<16) + (mfn<<16) / (mfd+1) );
quot = (pd+1) * (1<<16);
ll += quot / 2;
do_div(ll, quot);
return (unsigned int) ll;
}

unsigned int imx_get_system_clk(void)
Expand Down

0 comments on commit 8243ae7

Please sign in to comment.