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>
diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c
index b1cb4b3..301d9b3 100644
--- a/drivers/mmc/fsl_esdhc_spl.c
+++ b/drivers/mmc/fsl_esdhc_spl.c
@@ -38,7 +38,8 @@
 	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 @@
 	/*
 	* 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 @@
 #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");