diff mbox

[U-Boot,5/8] mmc: imx: add spl_board_mmc_init

Message ID 1415398375-20732-6-git-send-email-john.tobias.ph@gmail.com
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

John Tobias Nov. 7, 2014, 10:12 p.m. UTC
When CONFIG_SPL_MMC_SUPPORT is defined, by default the
mmc_initialize function will call board_mmc_init. But,
the said function is not link to the spl image.
---
 drivers/mmc/mmc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 44a4feb..8b68e3e 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1441,10 +1441,13 @@  int mmc_initialize(bd_t *bis)
 	INIT_LIST_HEAD (&mmc_devices);
 	cur_dev_num = 0;
 
+#ifdef CONFIG_SPL_BUILD
+	if (spl_board_mmc_init(bis) < 0)
+		cpu_mmc_init(bis);
+#else	
 	if (board_mmc_init(bis) < 0)
 		cpu_mmc_init(bis);
 
-#ifndef CONFIG_SPL_BUILD
 	print_mmc_devices(',');
 #endif