[PATCH 16/17] i.MX35: Fix ahbclock calculation
Sascha Hauer
s.hauer at pengutronix.de
Thu Apr 29 03:52:14 EDT 2010
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-imx/speed-imx35.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c
index 1721079..c5a31c7 100644
--- a/arch/arm/mach-imx/speed-imx35.c
+++ b/arch/arm/mach-imx/speed-imx35.c
@@ -74,9 +74,11 @@ unsigned long imx_get_ahbclk(void)
{
unsigned long pdr0 = readl(IMX_CCM_BASE + CCM_PDR0);
struct arm_ahb_div *aad;
- unsigned long fref = imx_get_armclk();
+ unsigned long fref = imx_get_mpllclk();
aad = &clk_consumer[(pdr0 >> 16) & 0xf];
+ if (aad->sel)
+ fref = fref * 3 / 4;
return fref / aad->ahb;
}
--
1.7.0
More information about the barebox
mailing list