]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: phy: cortina: Use block layer to read from mmc
authorYinbo Zhu <yinbo.zhu@nxp.com>
Tue, 11 Jun 2019 06:29:03 +0000 (14:29 +0800)
committerJoe Hershberger <joe.hershberger@ni.com>
Mon, 15 Jul 2019 18:32:25 +0000 (13:32 -0500)
This patch is to use block layer to read from mmc in cortina

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/cortina.c

index a04a118f900d5ec295edd8b8bc1aad32b7140569..ec81dab3f6cb50f73bff6acd5f8e641b9559d1ce 100644 (file)
@@ -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