[U-Boot] u-boot-owner@lists.denx.de

Hi,
The command ext2load do not work on the OMAP3 EVM.
The command line is: # ext2load mmc 0:2 0x82000000 /boot/uImage
The error is: ext2fs_devread() read error - block
After reading the u-boot source code, I see that the function mmc_bread() in file drivers/mmc/omap3_mmc.c do not return the good value.
So I apply this small patch to fix the problem
Best regards,
Mickael LANOE
--- u-boot-ori/drivers/mmc/omap3_mmc.c 2010-05-31 17:16:19.650857913 +0200 +++ u-boot/drivers/mmc/omap3_mmc.c 2010-06-01 09:22:47.485317977 +0200 @@ -507,9 +507,11 @@ unsigned char configure_mmc(mmc_card_dat unsigned long mmc_bread(int dev_num, unsigned long blknr, lbaint_t blkcnt, void *dst) { - omap_mmc_read_sect(blknr, (blkcnt * MMCSD_SECTOR_SIZE), &cur_card_data, - (unsigned long *) dst); - return 1; + if(omap_mmc_read_sect(blknr, (blkcnt * MMCSD_SECTOR_SIZE), &cur_card_data, + (unsigned long *) dst) != 1) + return 0; + + return blkcnt; }
int mmc_legacy_init(int verbose)
participants (1)
-
Mickael Lanoe