[U-Boot] mpc85xx: Put SDHC clock-frequency in device tree

Gao Guanhua B22826 at freescale.com
Wed Sep 23 09:12:12 CEST 2009


The clock-frequency of SD controller comes from different source on
different platform. We add a clock-frequency property in dts file
and set the value in u-boot.
---
 cpu/mpc85xx/fdt.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/cpu/mpc85xx/fdt.c b/cpu/mpc85xx/fdt.c
index 26a8f48..e549c66 100644
--- a/cpu/mpc85xx/fdt.c
+++ b/cpu/mpc85xx/fdt.c
@@ -328,5 +328,11 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 	ft_fixup_cpu(blob, (u64)bd->bi_memstart + (u64)bd->bi_memsize);
 #endif
 
+#ifdef CONFIG_FSL_ESDHC
+	do_fixup_by_compat_u32(blob, "fsl,esdhc",
+		"clock-frequency", bd->bi_busfreq/2, 1);
+#endif
+
+
 	ft_fixup_cache(blob);
 }
-- 
1.6.4



More information about the U-Boot mailing list