[PATCH 08/10] speed-imx35: add support for SDHC1
Eric Bénard
eric at eukrea.com
Thu Oct 14 10:05:30 EDT 2010
Signed-off-by: Eric Bénard <eric at eukrea.com>
---
arch/arm/mach-imx/speed-imx35.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-imx/speed-imx35.c b/arch/arm/mach-imx/speed-imx35.c
index c5a31c7..324cc29 100644
--- a/arch/arm/mach-imx/speed-imx35.c
+++ b/arch/arm/mach-imx/speed-imx35.c
@@ -163,6 +163,17 @@ unsigned long imx_get_uartclk(void)
return imx_get_ppllclk() / div;
}
+unsigned long imx_get_mmcclk(void)
+{
+ unsigned long pdr3 = readl(IMX_CCM_BASE + CCM_PDR3);
+ unsigned long div = get_3_3_div(pdr3);
+
+ if (pdr3 & (1 << 6))
+ return imx_get_armclk() / div;
+ else
+ return imx_get_ppllclk() / div;
+}
+
ulong imx_get_fecclk(void)
{
return imx_get_ipgclk();
@@ -183,6 +194,7 @@ void imx_dump_clocks(void)
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());
+ printf("sdhc1: %10d Hz\n", imx_get_mmcclk());
}
/*
--
1.7.0.4
More information about the barebox
mailing list