summaryrefslogtreecommitdiff
path: root/cmd/mmc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-05-01 19:52:35 (GMT)
committerSimon Glass <sjg@chromium.org>2016-05-17 15:54:43 (GMT)
commitc40fdca6b7db469d3982cc44fd68a269adb41b25 (patch)
treea95063f9ae5b62a66999fcfb00a90dbf8edd226a /cmd/mmc.c
parentcffe5d86cfe853ae9271d37522f8bc5795cc4c69 (diff)
downloadu-boot-fsl-qoriq-c40fdca6b7db469d3982cc44fd68a269adb41b25.tar.xz
dm: mmc: Move the device list into a separate file
At present the MMC subsystem maintains its own list of MMC devices. This cannot work with driver model, which needs to maintain this itself. Move the list code into a separate 'legacy' file. The core MMC code remains, and will be shared with the driver-model implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/mmc.c')
-rw-r--r--cmd/mmc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 8695c19..eb4a547 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -348,7 +348,7 @@ static int do_mmc_read(cmd_tbl_t *cmdtp, int flag,
printf("\nMMC read: dev # %d, block # %d, count %d ... ",
curr_device, blk, cnt);
- n = blk_dread(&mmc->block_dev, blk, cnt, addr);
+ n = blk_dread(mmc_get_blk_desc(mmc), blk, cnt, addr);
/* flush cache after read */
flush_cache((ulong)addr, cnt * 512); /* FIXME */
printf("%d blocks read: %s\n", n, (n == cnt) ? "OK" : "ERROR");
@@ -380,7 +380,7 @@ static int do_mmc_write(cmd_tbl_t *cmdtp, int flag,
printf("Error: card is write protected!\n");
return CMD_RET_FAILURE;
}
- n = blk_dwrite(&mmc->block_dev, blk, cnt, addr);
+ n = blk_dwrite(mmc_get_blk_desc(mmc), blk, cnt, addr);
printf("%d blocks written: %s\n", n, (n == cnt) ? "OK" : "ERROR");
return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
@@ -408,7 +408,7 @@ static int do_mmc_erase(cmd_tbl_t *cmdtp, int flag,
printf("Error: card is write protected!\n");
return CMD_RET_FAILURE;
}
- n = blk_derase(&mmc->block_dev, blk, cnt);
+ n = blk_derase(mmc_get_blk_desc(mmc), blk, cnt);
printf("%d blocks erased: %s\n", n, (n == cnt) ? "OK" : "ERROR");
return (n == cnt) ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
@@ -480,7 +480,7 @@ static int do_mmc_dev(cmd_tbl_t *cmdtp, int flag,
printf("mmc%d is current device\n", curr_device);
else
printf("mmc%d(part %d) is current device\n",
- curr_device, mmc->block_dev.hwpart);
+ curr_device, mmc_get_blk_desc(mmc)->hwpart);
return CMD_RET_SUCCESS;
}