summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/generic.c
diff options
context:
space:
mode:
authorPavel Pisa <ppisa@pikron.com>2007-03-07 23:56:16 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-03-12 16:49:35 +0000
commitb3c6b76ffb1a8c8d1f12e838a25c1a86f5316e2c (patch)
tree7e68897d90f93ea62b890128408cfbf2d0b57c86 /arch/arm/mach-imx/generic.c
parent83b84c4e8c7cf00e26610f03ee59e9be010f527c (diff)
downloadblackbird-op-linux-b3c6b76ffb1a8c8d1f12e838a25c1a86f5316e2c.tar.gz
blackbird-op-linux-b3c6b76ffb1a8c8d1f12e838a25c1a86f5316e2c.zip
[ARM] 4255/1: i.MX/MX1 Correct MPU PLL reference clock value.
Only System PLL clock source is selectable by CSCR_SYSTEM_SEL bit. MPU PLL is driven by 512*CLK32 for each case. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-imx/generic.c')
-rw-r--r--arch/arm/mach-imx/generic.c9
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);
* f = 2 * f_ref * --------------------
* pd + 1
*/
-static unsigned int imx_decode_pll(unsigned int pll)
+static unsigned int imx_decode_pll(unsigned int pll, u32 f_ref)
{
unsigned long long ll;
unsigned long quot;
@@ -111,7 +111,6 @@ static unsigned int imx_decode_pll(unsigned int pll)
u32 mfn = pll & 0x3ff;
u32 mfd = (pll >> 16) & 0x3ff;
u32 pd = (pll >> 26) & 0xf;
- u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512);
mfi = mfi <= 5 ? 5 : mfi;
@@ -124,13 +123,15 @@ static unsigned int imx_decode_pll(unsigned int pll)
unsigned int imx_get_system_clk(void)
{
- return imx_decode_pll(SPCTL0);
+ u32 f_ref = (CSCR & CSCR_SYSTEM_SEL) ? 16000000 : (CLK32 * 512);
+
+ return imx_decode_pll(SPCTL0, f_ref);
}
EXPORT_SYMBOL(imx_get_system_clk);
unsigned int imx_get_mcu_clk(void)
{
- return imx_decode_pll(MPCTL0);
+ return imx_decode_pll(MPCTL0, CLK32 * 512);
}
EXPORT_SYMBOL(imx_get_mcu_clk);
OpenPOWER on IntegriCloud