diff options
author | Stephen Warren <swarren@nvidia.com> | 2015-12-07 11:38:48 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-01-13 21:05:18 -0500 |
commit | 7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86 (patch) | |
tree | 8dfb6b9f5721891de191bad798b0533e3a0bf69a /drivers/mmc/fsl_esdhc_spl.c | |
parent | adc421e4cee8275cd99367b3b455ffbb5ead3990 (diff) | |
download | u-boot-7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86.tar.gz u-boot-7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86.tar.bz2 u-boot-7c4213f6a52f35ff6ba2d97aa4eb04cbfc963b86.zip |
block: pass block dev not num to read/write/erase()
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/mmc/fsl_esdhc_spl.c')
-rw-r--r-- | drivers/mmc/fsl_esdhc_spl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c index b1cb4b3534..301d9b3ab9 100644 --- a/drivers/mmc/fsl_esdhc_spl.c +++ b/drivers/mmc/fsl_esdhc_spl.c @@ -38,7 +38,8 @@ void mmc_spl_load_image(uint32_t offs, unsigned int size, void *vdst) blk_start = ALIGN(offs, mmc->read_bl_len) / mmc->read_bl_len; blk_cnt = ALIGN(size, mmc->read_bl_len) / mmc->read_bl_len; - err = mmc->block_dev.block_read(0, blk_start, blk_cnt, vdst); + err = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt, + vdst); if (err != blk_cnt) { puts("spl: mmc read failed!!\n"); hang(); @@ -85,7 +86,8 @@ void __noreturn mmc_boot(void) /* * Read source addr from sd card */ - err = mmc->block_dev.block_read(0, CONFIG_CFG_DATA_SECTOR, 1, tmp_buf); + err = mmc->block_dev.block_read(&mmc->block_dev, + CONFIG_CFG_DATA_SECTOR, 1, tmp_buf); if (err != 1) { puts("spl: mmc read failed!!\n"); free(tmp_buf); @@ -126,7 +128,7 @@ void __noreturn mmc_boot(void) #endif blk_start = ALIGN(offset, mmc->read_bl_len) / mmc->read_bl_len; blk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len; - err = mmc->block_dev.block_read(0, blk_start, blk_cnt, + err = mmc->block_dev.block_read(&mmc->block_dev, blk_start, blk_cnt, (uchar *)CONFIG_SYS_MMC_U_BOOT_DST); if (err != blk_cnt) { puts("spl: mmc read failed!!\n"); |