Goal:
Refer to the "COMMON/CMD_MMC.C" lookup eMMC code, after the MMC bus initialization function, traverse the MMC bus, find eMMC and
Print EMMC information.
Add our traversal function to the last side of the Mmc_initialize function in "DRIVERS/MMC/MMC.C"
Int mmc_initialize (bd_t *bis)
{
init_list_head (&mmc_devices);
cur_dev_num = 0;
if (Board_mmc_init (bis) < 0)
cpu_mmc_init (bis);
print_mmc_devices (', ');
printf ("---------------------------------------------\ n");
my_print_mmcinfo (0); , &NB Sp //printing devices on mmc0
printf ("---------------------------------------------\ n");
my_print_mmcinfo (1); , &NB Sp //printing devices on MMC1
printf ("---------------------------------------------\ n");
return 0;
}
static void My_print_mmcinfo (int index)
{
struct MMC *mmc;
MMC = find_mmc_device (index);
if (MMC)
{
Mmc_init (MMC);
Print_mmcinfo (MMC); Simply glue this function in the CMD_MMC.C.
}
Else
{
printf ("No MMC device at slot%d\n", index);
}
}
The print results are as follows: This printout was made under FTP-initiated conditions.
---------------------------------------------
Card did not respond to voltage select!
Device:omap SD/MMC
Manufacturer id:0
oem:0
Name:tran speed:0
Rd Block len:0
MMC version 0.0
High Capacity:no
capacity:0 Bytes
Bus Width:1-bit
---------------------------------------------
Mmc_send_cmd:timeout:No status update
Device:omap SD/MMC
Manufacturer Id:70
oem:100
Name:mmc04
Tran speed:52000000
Rd Block len:512
MMC version 4.0
High Capacity:yes
capacity:3.6 GiB
Bus Width:4-bit
---------------------------------------------
From the print results you can see that eMMC is hanging under MMC1, MMC0 is the SD card