This patch is to use block layer to read from mmc in cortina

Signed-off-by: Yinbo Zhu <yinbo....@nxp.com>
---
Change in v2:
                Update the commit information.
Change in v3:
                Limit patch work when BLK enabled.

 drivers/net/phy/cortina.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/phy/cortina.c b/drivers/net/phy/cortina.c
index a04a118f90..ec81dab3f6 100644
--- a/drivers/net/phy/cortina.c
+++ b/drivers/net/phy/cortina.c
@@ -176,8 +176,13 @@ void cs4340_upload_firmware(struct phy_device *phydev)
                printf("MMC read: dev # %u, block # %u, count %u ...\n",
                       dev, blk, cnt);
                mmc_init(mmc);
+#ifdef CONFIG_BLK
+               (void)blk_dread(mmc_get_blk_desc(mmc), blk, cnt,
+                                               addr);
+#else
                (void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
                                                addr);
+#endif
        }
 #endif
 
-- 
2.17.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to