[U-Boot] multichannel mmc strangeness on omap

Does anyone have any experience enabling the second or third mmc channels in u-boot on an omap3 board?
I used the feature successfully a couple of years ago on Overo, but of course there have been many changes in the mmc code since then.
Here's what I tried for overo with the current head of tree:
diff --git a/board/overo/overo.c b/board/overo/overo.c index f973870..51315b3 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -404,6 +404,7 @@ int board_eth_init(bd_t *bis) int board_mmc_init(bd_t *bis) { omap_mmc_init(0, 0, 0); + omap_mmc_init(2, 0, 0); return 0; } #endif
The result is a hang after printing: MMC: OMAP SD/MMC 0, SD/MMC 1
After adding a few printf's, it seems that the crash/hang is occurring when calling env_relocate_spec in env_nand.c, which of course is completely unrelated code!
Just for grins I tried enabling the second mmc channel instead (i.e change omap_mmc_init(2, 0, 0) to omap_mmc_init(1, 0, 0)).
This worked as expected. I also tried enabling all three, which resulted in the same crash. So enabling the third mmc channel seems to be the issue.
Before I start debugging I thought I would check to see if anyone else has seen this or has any theories as to why it is happening.
Steve

On Mon, Jul 30, 2012 at 06:36:24AM -0700, Steve Sakoman wrote:
Does anyone have any experience enabling the second or third mmc channels in u-boot on an omap3 board?
I used the feature successfully a couple of years ago on Overo, but of course there have been many changes in the mmc code since then.
Here's what I tried for overo with the current head of tree:
diff --git a/board/overo/overo.c b/board/overo/overo.c index f973870..51315b3 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -404,6 +404,7 @@ int board_eth_init(bd_t *bis) int board_mmc_init(bd_t *bis) { omap_mmc_init(0, 0, 0);
- omap_mmc_init(2, 0, 0); return 0;
} #endif
The result is a hang after printing: MMC: OMAP SD/MMC 0, SD/MMC 1
After adding a few printf's, it seems that the crash/hang is occurring when calling env_relocate_spec in env_nand.c, which of course is completely unrelated code!
I've spent some time scratching my head against a hang in the same spot, on am335x. I only have seen it when booting from NAND (same image from MMC or UART is fine). Further, it only showed up when a change was made in another driver which isn't even entered before the hang.

On Mon, Jul 30, 2012 at 7:27 AM, Tom Rini trini@ti.com wrote:
After adding a few printf's, it seems that the crash/hang is occurring when calling env_relocate_spec in env_nand.c, which of course is completely unrelated code!
I've spent some time scratching my head against a hang in the same spot, on am335x. I only have seen it when booting from NAND (same image from MMC or UART is fine). Further, it only showed up when a change was made in another driver which isn't even entered before the hang.
In order to keep making progress on hardware bringup I swapped the base register pointer setup for mmc2 and mmc3 since enabling mmc2 in the board file didn't seem to cause the hang.
With this change the mmc3 port hardware worked as expected.
What a strange bug! I have a feeling that this is going to be a real bear to find root cause.
Steve
participants (2)
-
Steve Sakoman
-
Tom Rini