This series aims at addressing an issue discovered with SPL mode when the MMC device being used lacks an environment partition. http://www.mail-archive.com/meta-ti@yoctoproject.org/msg04320.html includes details on the original failure with this diagnosis:
This is a bug in handling mmc_switch_part: what's happening is that the code reconfigures the mmc device to look at the partition on which the environment is to be found, but fails to restore it to reflect the state of the whole device. I.e., the mmc capacity and lba are zero in my case (I have no partition 2 on the uSD card), but mmc_switch_part() returns -ENODEV on the attempt to switch back in fini_mmc_for_env() without also resetting the capacity to what the rest of the system expects. The first fixes a mistaken assumption about how mmc_switch_part() behaves. (Personally, I think mmc_switch_part() should have recorded the new partition in the device structure, but that's an behavioral change that I'm not going to introduce.) The second fixes the underlying problem, which was the failure to restore the capacity configuration to the whole device after interacting with the environment. FWIW: The second patch is relevant to 2014.07; the first is not. Peter A. Bigot (2): env_mmc: remove condition on call to mmc_switch_part mmc: restore capacity when switching to partition 0 common/env_mmc.c | 11 ++++------- drivers/mmc/mmc.c | 11 ++++++++--- 2 files changed, 12 insertions(+), 10 deletions(-) -- 1.8.5.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot