MMC Device 0 not found
Hello,
I have a custom board with an eMMC on it and with no SD card available. In the U-Boot device tree I have the following line (On sdmmc2 is my eMMC):
aliases{
mmc0 = &sdmmc2;
};The U-Boot seems to partly have a problem with it.
- Commands like "mmc write" or "mmc info" use the MMC Interface 0 - they set "curr_device" to 0 by default (unless I use "mmc dev 1"). And this is not a problem.
- However, the MMC environment works with MMC interface 1, which leads to failures. What I find the most weird is the following function in the mmc.c file:
static int env_mmc_save(void)
{
ALLOC_CACHE_ALIGN_BUFFER(env_t, env_new, 1);
int dev = mmc_get_env_dev();
...
}The variable dev in the line 4 is always 1, I guess since the eMMC is set as boot instance 1.
To sum up: The MMC functions work by default with mmc 0, the env MMC works by defalt with mmc 1.
PS: I could maybe use the MMC 1 and use the 'mmc dev 1' at the beginning, but the STMCubeProgrammer cannot flash the devce as it comes with an error:
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:01:40.159
RUNNING Program ...
PartID: :0x03
Start operation done successfully at partition 0x03
GETPHASE command not acknowledged!
Reemission of GetPhase command
Error: GetPhase Error: mmc device 1 not found
Received PhaseID == 0xFF, system is going to rebootCould someone help me on this?
