All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v9 1/8] ppa/fm/qe: use block layer in ppa/fm/qe driver
@ 2018-09-25  6:47 Yinbo Zhu
  2018-09-25  6:47 ` [U-Boot] [PATCH v9 2/8] armv8/ls1088a/ls2088a: esdhc: Add esdhc clock support Yinbo Zhu
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Yinbo Zhu @ 2018-09-25  6:47 UTC (permalink / raw)
  To: u-boot

At present the MMC subsystem maintains its own list
of MMC devices. This cannot work with driver model
when CONFIG_BLK is enabled, use blk_dread to
replace previous mmc read interface,
use mmc_get_blk_desc to get the mmc device property

Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
Change in v9:
		fix ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig compiling errors 

 arch/arm/cpu/armv8/fsl-layerscape/ppa.c |    7 +++----
 drivers/net/fm/fm.c                     |    2 +-
 drivers/qe/qe.c                         |    2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
index a31c4d9..d391f93 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c
@@ -99,7 +99,7 @@ int ppa_init(void)
 	cnt = DIV_ROUND_UP(fdt_header_len, 512);
 	debug("%s: MMC read PPA FIT header: dev # %u, block # %u, count %u\n",
 	      __func__, dev, blk, cnt);
-	ret = mmc->block_dev.block_read(&mmc->block_dev, blk, cnt, fitp);
+	ret = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, fitp);
 	if (ret != cnt) {
 		free(fitp);
 		printf("MMC/SD read of PPA FIT header at offset 0x%x failed\n",
@@ -123,7 +123,7 @@ int ppa_init(void)
 
 	blk = CONFIG_SYS_LS_PPA_ESBC_ADDR >> 9;
 	cnt = DIV_ROUND_UP(CONFIG_LS_PPA_ESBC_HDR_SIZE, 512);
-	ret = mmc->block_dev.block_read(&mmc->block_dev, blk, cnt, ppa_hdr_ddr);
+	ret = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, ppa_hdr_ddr);
 	if (ret != cnt) {
 		free(ppa_hdr_ddr);
 		printf("MMC/SD read of PPA header failed\n");
@@ -149,8 +149,7 @@ int ppa_init(void)
 	cnt = DIV_ROUND_UP(fw_length, 512);
 	debug("%s: MMC read PPA FIT image: dev # %u, block # %u, count %u\n",
 	      __func__, dev, blk, cnt);
-	ret = mmc->block_dev.block_read(&mmc->block_dev,
-					blk, cnt, ppa_fit_addr);
+	ret = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, ppa_fit_addr);
 	if (ret != cnt) {
 		free(ppa_fit_addr);
 		printf("MMC/SD read of PPA FIT header at offset 0x%x failed\n",
diff --git a/drivers/net/fm/fm.c b/drivers/net/fm/fm.c
index 3327073..c5cf188 100644
--- a/drivers/net/fm/fm.c
+++ b/drivers/net/fm/fm.c
@@ -402,7 +402,7 @@ int fm_init_common(int index, struct ccsr_fman *reg)
 		printf("\nMMC read: dev # %u, block # %u, count %u ...\n",
 				dev, blk, cnt);
 		mmc_init(mmc);
-		(void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
+		(void)blk_dread(mmc_get_blk_desc(mmc), blk, cnt,
 						addr);
 	}
 #elif defined(CONFIG_SYS_QE_FMAN_FW_IN_REMOTE)
diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index 7654df8..7010bbc 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -218,7 +218,7 @@ void u_qe_init(void)
 		printf("\nMMC read: dev # %u, block # %u, count %u ...\n",
 		       dev, blk, cnt);
 		mmc_init(mmc);
-		(void)mmc->block_dev.block_read(&mmc->block_dev, blk, cnt,
+		(void)blk_dread(mmc_get_blk_desc(mmc), blk, cnt,
 						addr);
 	}
 #endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-09-28 15:39 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-25  6:47 [U-Boot] [PATCH v9 1/8] ppa/fm/qe: use block layer in ppa/fm/qe driver Yinbo Zhu
2018-09-25  6:47 ` [U-Boot] [PATCH v9 2/8] armv8/ls1088a/ls2088a: esdhc: Add esdhc clock support Yinbo Zhu
2018-09-25  6:47 ` [U-Boot] [PATCH v9 3/8] armv8: ls2088a: add eSDHC node Yinbo Zhu
2018-09-25  6:47 ` [U-Boot] [PATCH v9 4/8] armv8: ls1088a: " Yinbo Zhu
2018-09-25  6:47 ` [U-Boot] [PATCH v9 5/8] armv8: ls1043a: " Yinbo Zhu
2018-09-25  6:47 ` [U-Boot] [PATCH v9 6/8] armv8: ls1046a: " Yinbo Zhu
2018-09-25  6:47 ` [U-Boot] [PATCH v9 7/8] armv7: ls1021a: enable esdhc Yinbo Zhu
2018-09-25  6:47 ` [U-Boot] [PATCH v9 8/8] Enable CONFIG_BLK and CONFIG_DM_MMC to Kconfig Yinbo Zhu
2018-09-25 16:58   ` York Sun
2018-09-26 10:57     ` Yinbo Zhu
2018-09-26 16:45       ` York Sun
2018-09-28 15:39 ` [U-Boot] [PATCH v9 1/8] ppa/fm/qe: use block layer in ppa/fm/qe driver York Sun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.