To use SD card, you should use the following command:
mmc dev 1
the ‘1’ means the second device, which is SD card.
and you will get output like this:
U-Boot> mmc dev 1
switch to partitions #0, OK
mmc1 is current device
U-Boot> mmc list
mmc@11230000: 0
mmc@11240000: 1 (SD)
U-Boot> mmc info
Device: mmc@11240000
Manufacturer ID: 11
OEM: 4499
Name: SD256
Bus Speed: 50000000
Mode : SD High Speed (50MHz)
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 239 MiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
To switch HW partitions (boot0/boot1/user), uses the following commands:
mmc dev 0 1
the second number ‘1’ means partition boot0 (according to the eMMC spec)
Read the first block to check it:
U-Boot> mmc dev 0 1
switch to partitions #1, OK
mmc0(part 1) is current device
U-Boot> mmc read 0x80000000 0 2
MMC read: dev # 0, block # 0, count 2 ... 2 blocks read: OK
U-Boot> md 0x80000000
80000000: 434d4d45 4f4f425f 00000054 00000001 EMMC_BOOT.......
80000010: 00000200 ffffffff ffffffff ffffffff ................
80000020: ffffffff ffffffff ffffffff ffffffff ................