All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] MMC boot broken on OMAP-L138 LCDK
@ 2019-05-17 12:36 Sekhar Nori
  2019-05-17 13:04 ` Adam Ford
  0 siblings, 1 reply; 7+ messages in thread
From: Sekhar Nori @ 2019-05-17 12:36 UTC (permalink / raw)
  To: u-boot

Hi Adam,

MMC/SD boot is broken on OMAP-L138 LCDK. This is since v2018.11. 
v2018.09 is fine.

The first breakage occurred with commit 21af33ed0319 ("ARM: davinci: 
omapl138_lcdk: Enable DM_MMC"). This commit moved to DM_MMC for U-Boot 
while keeping legacy mode for SPL.

The "#ifndef CONFIG_DM_MMC" introduced by this commit is incorrect I 
think because CONFIG_DM_MMC is defined in SPL build too and because of 
this board_mmc_init() never gets defined. I think the intent was to 
define board_mmc_init() for SPL case, and for that the following diff 
should do:

diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 2c2f885d43e4..fe1bf4410145 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -353,7 +353,7 @@ int misc_init_r(void)
 	return 0;
 }
 
-#ifndef CONFIG_DM_MMC
+#if !CONFIG_IS_ENABLED(DM_MMC)
 #ifdef CONFIG_MMC_DAVINCI
 static struct davinci_mmc mmc_sd0 = {
 	.reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE,


With this fixed, MMC/SD boot is still broken after commit 15b8c7505819 
("davinci: da850evm/omapl138-lcdk: Move BSS to SDRAM because SRAM is 
full").

After this commit, mmc_initialize() in drivers/mmc/mmc.c fails because 
the static variable 'initialized' does not get initialized to 0 as 
intended in code and gets set to a random value because of which no 
MMC/SD device gets registered. I did notice that 'initialized' is in 
BSS, so I believe after this commit BSS is not getting set to 0.

Thanks,
Sekhar

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-20 19:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-17 12:36 [U-Boot] MMC boot broken on OMAP-L138 LCDK Sekhar Nori
2019-05-17 13:04 ` Adam Ford
2019-05-20  9:09   ` Sekhar Nori
2019-05-20 12:25     ` Adam Ford
2019-05-20 12:38       ` Sekhar Nori
2019-05-20 15:00         ` Adam Ford
2019-05-20 19:53           ` Adam Ford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.