mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
board: sdhc: Use block layer to read from mmc
Use block layer to read from mmc Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
This commit is contained in:
parent
c44d05d97b
commit
7e20c1f4b1
1 changed files with 4 additions and 0 deletions
|
@ -28,7 +28,11 @@ int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr)
|
|||
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);
|
||||
#endif
|
||||
if (!n) {
|
||||
free(tmp_buf);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue