projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c44d05d
)
board: sdhc: Use block layer to read from mmc
author
Yinbo Zhu
<yinbo.zhu@nxp.com>
Tue, 15 Oct 2019 09:20:49 +0000
(17:20 +0800)
committer
Priyanka Jain
<priyanka.jain@nxp.com>
Mon, 25 Nov 2019 06:24:27 +0000
(11:54 +0530)
Use block layer to read from mmc
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
board/freescale/common/sdhc_boot.c
patch
|
blob
|
history
diff --git
a/board/freescale/common/sdhc_boot.c
b/board/freescale/common/sdhc_boot.c
index 357aba91225df62c8a6626e06fee7f077f6a5187..a1c7a94a90e347c58c3e3b032e53870d6b83b15b 100644
(file)
--- a/
board/freescale/common/sdhc_boot.c
+++ b/
board/freescale/common/sdhc_boot.c
@@
-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;