summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2009-11-18 15:51:50 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2009-11-24 10:01:30 +0100
commitbb3f431deb0a7f22ced952b5750afe1725a4bcde (patch)
tree40f82234dd3124cf451a1f879e142d29bfd0f252
parent7ee5aa3329386ff8244e011b51d539c1d87b8dd6 (diff)
downloadbarebox-bb3f431deb0a7f22ced952b5750afe1725a4bcde.tar.gz
barebox-bb3f431deb0a7f22ced952b5750afe1725a4bcde.tar.xz
speed-imx35: the gptclk is connected to the ipgclk
The gpt clock on MX35 is connected to the ipg clock. But the implementation uses the ipg_per clock. This patch lets the gpt use the ipg clock and introduces the ipg_per clock. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--arch/arm/mach-imx/speed-imx35.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c
index 8d1614f3de..655b38b613 100644
--- a/arch/arm/mach-imx/speed-imx35.c
+++ b/arch/arm/mach-imx/speed-imx35.c
@@ -93,7 +93,7 @@ static unsigned long get_3_3_div(unsigned long in)
return (((in >> 3) & 0x7) + 1) * ((in & 0x7) + 1);
}
-unsigned long imx_get_gptclk(void)
+unsigned long imx_get_ipg_perclk(void)
{
ulong pdr0 = readl(IMX_CCM_BASE + CCM_PDR0);
ulong pdr4 = readl(IMX_CCM_BASE + CCM_PDR4);
@@ -107,12 +107,17 @@ unsigned long imx_get_gptclk(void)
} else {
/* perclk from AHB divided clock */
fref = imx_get_ahbclk();
- div = ((pdr0 >> 12) & 0x7) + 1; //FIXME check datasheet 111 -> 7 ?
+ div = ((pdr0 >> 12) & 0x7) + 1;
}
return fref / div;
}
+unsigned long imx_get_gptclk(void)
+{
+ return imx_get_ipgclk();
+}
+
unsigned long imx_get_uartclk(void)
{
unsigned long pdr3 = readl(IMX_CCM_BASE + CCM_PDR3);
@@ -137,6 +142,7 @@ void imx_dump_clocks(void)
printf("gpt: %10d Hz\n", imx_get_gptclk());
printf("ahb: %10d Hz\n", imx_get_ahbclk());
printf("ipg: %10d Hz\n", imx_get_ipgclk());
+ printf("ipg_per: %10d Hz\n", imx_get_ipg_perclk());
printf("uart: %10d Hz\n", imx_get_uartclk());
}