[U-Boot] [PATCH v2 7/7] mx35: Add cpu_mmc_init()

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Fri Aug 17 22:43:48 CEST 2012


Add cpu_mmc_init() function to make it easy to init a single eSDHC instance.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau at advansee.com>
Cc: Stefano Babic <sbabic at denx.de>
---
Changes for v2:
 - Do not define cpu_mmc_init() if CONFIG_FSL_ESDHC is not defined.

 .../arch/arm/cpu/arm1136/mx35/generic.c            |   15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git u-boot-4d3c95f.orig/arch/arm/cpu/arm1136/mx35/generic.c u-boot-4d3c95f/arch/arm/cpu/arm1136/mx35/generic.c
index 15a0098..8f61069 100644
--- u-boot-4d3c95f.orig/arch/arm/cpu/arm1136/mx35/generic.c
+++ u-boot-4d3c95f/arch/arm/cpu/arm1136/mx35/generic.c
@@ -31,6 +31,9 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#ifdef CONFIG_FSL_ESDHC
+#include <fsl_esdhc.h>
+#endif
 #include <netdev.h>
 
 #define CLK_CODE(arm, ahb, sel) (((arm) << 16) + ((ahb) << 8) + (sel))
@@ -458,7 +461,6 @@ int print_cpuinfo(void)
  * Initializes on-chip ethernet controllers.
  * to override, implement board_eth_init()
  */
-
 int cpu_eth_init(bd_t *bis)
 {
 	int rc = -ENODEV;
@@ -470,6 +472,17 @@ int cpu_eth_init(bd_t *bis)
 	return rc;
 }
 
+#ifdef CONFIG_FSL_ESDHC
+/*
+ * Initializes on-chip MMC controllers.
+ * to override, implement board_mmc_init()
+ */
+int cpu_mmc_init(bd_t *bis)
+{
+	return fsl_esdhc_mmc_init(bis);
+}
+#endif
+
 int get_clocks(void)
 {
 #ifdef CONFIG_FSL_ESDHC


More information about the U-Boot mailing list