Use block layer to read from mmc
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
return 1;
/* read out the first block, get the config data information */
return 1;
/* read out the first block, get the config data information */
+#ifdef CONFIG_BLK
+ n = blk_dread(mmc_get_blk_desc(mmc), 0, 1, tmp_buf);
+#else
n = mmc->block_dev.block_read(&mmc->block_dev, 0, 1, tmp_buf);
n = mmc->block_dev.block_read(&mmc->block_dev, 0, 1, tmp_buf);
if (!n) {
free(tmp_buf);
return 1;
if (!n) {
free(tmp_buf);
return 1;