From: John Tobias Date: Sat, 8 Nov 2014 13:27:53 -0800 Subject: [U-Boot] [PATCH v3 2/8] mmc: imx6: call spl_board_mmc_init In-Reply-To: <1415482079-9531-1-git-send-email-john.tobias.ph@gmail.com> References: <1415482079-9531-1-git-send-email-john.tobias.ph@gmail.com> Message-ID: <1415482079-9531-3-git-send-email-john.tobias.ph@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add to call spl_board_mmc_init 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 44a4feb..88c1b03 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1441,11 +1441,14 @@ int mmc_initialize(bd_t *bis) INIT_LIST_HEAD (&mmc_devices); cur_dev_num = 0; - if (board_mmc_init(bis) < 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(','); + print_mmc_devices(','); #endif do_preinit(); -- 1.9.1