diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-12 15:31:43 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-12 15:31:43 -0400 |
| commit | 529284a0b649499351495949d05fa3359121cbae (patch) | |
| tree | 9b33459a8f720313eeee469bfe18eeb5052246d2 /arch/arm/mach-imx/generic.c | |
| parent | be521466feb3bb1cd89de82a2b1d080e9ebd3cb6 (diff) | |
| parent | 1dee79087c8b0f3239a2979f61ed92c7a5361b08 (diff) | |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 4263/1: fix IXP4XX_NPE[ABC]_BASE_VIRT address
[ARM] 4256/1: i.MX/MX1 SDHC fix/workaround of SD card recognition problems
[ARM] 4255/1: i.MX/MX1 Correct MPU PLL reference clock value.
[ARM] 4254/1: i.MX/MX1 CPU Frequency scaling honor boot loader set BCLK_DIV.
[ARM] 4251/1: Fix sharpsl_pm dependency
[ARM] 4250/1: Fix locomo backlight conversion error/compile failure
[ARM] 4249/1: Fix tosa compile failure
[ARM] 4248/1: lh7a40x: fix missing definitions for get_irqnr_preamble
[ARM] 4247/1: Fix long name for cc9p9360dev
ARM: OMAP: Fix OMAP2 dss2 so clk_set_parent works
ARM: OMAP: Fix missing workqueue include in board-h2.c
ARM: OMAP: Include missing header
Diffstat (limited to 'arch/arm/mach-imx/generic.c')
| -rw-r--r-- | arch/arm/mach-imx/generic.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/generic.c b/arch/arm/mach-imx/generic.c index b5aa49d00ca3..7a7fa51ec62c 100644 --- a/arch/arm/mach-imx/generic.c +++ b/arch/arm/mach-imx/generic.c | |||
| @@ -102,7 +102,7 @@ EXPORT_SYMBOL(imx_gpio_mode); | |||
| 102 | * f = 2 * f_ref * -------------------- | 102 | * f = 2 * f_ref * -------------------- |
| 103 | * pd + 1 | 103 | * pd + 1 |
| 104 | */ | 104 | */ |
| 105 | static unsigned int imx_decode_pll(unsigned int pll) | 105 | static unsigned int imx_decode_pll(unsigned int pll, u32 f_ref) |
| 106 | { | 106 | { |
| 107 | unsigned long long ll; | 107 | unsigned long long ll; |
| 108 | unsigned long quot; | 108 | unsigned long quot; |
| @@ -111,7 +111,6 @@ static unsigned int imx_decode_pll(unsigned int pll) | |||
| 111 | u32 mfn = pll & 0x3ff; | 111 | u32 mfn = pll & 0x3ff; |
| 112 | u32 mfd = (pll >> 16) & 0x3ff; | 112 | u32 mfd = (pll >> 16) & 0x3ff; |
| 113 | u32 pd = (pll >> 26) & 0xf; | 113 | u32 pd = (pll >> 26) & 0xf; |
| 114 | u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512); | ||
| 115 | 114 | ||
| 116 | mfi = mfi <= 5 ? 5 : mfi; | 115 | mfi = mfi <= 5 ? 5 : mfi; |
| 117 | 116 | ||
| @@ -124,13 +123,15 @@ static unsigned int imx_decode_pll(unsigned int pll) | |||
| 124 | 123 | ||
| 125 | unsigned int imx_get_system_clk(void) | 124 | unsigned int imx_get_system_clk(void) |
| 126 | { | 125 | { |
| 127 | return imx_decode_pll(SPCTL0); | 126 | u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512); |
| 127 | |||
| 128 | return imx_decode_pll(SPCTL0, f_ref); | ||
| 128 | } | 129 | } |
| 129 | EXPORT_SYMBOL(imx_get_system_clk); | 130 | EXPORT_SYMBOL(imx_get_system_clk); |
| 130 | 131 | ||
| 131 | unsigned int imx_get_mcu_clk(void) | 132 | unsigned int imx_get_mcu_clk(void) |
| 132 | { | 133 | { |
| 133 | return imx_decode_pll(MPCTL0); | 134 | return imx_decode_pll(MPCTL0, CLK32 * 512); |
| 134 | } | 135 | } |
| 135 | EXPORT_SYMBOL(imx_get_mcu_clk); | 136 | EXPORT_SYMBOL(imx_get_mcu_clk); |
| 136 | 137 | ||
