]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
dm: spl: mmc: Support CONFIG_BLK in SPL MMC
authorSimon Glass <sjg@chromium.org>
Mon, 13 Jun 2016 05:30:32 +0000 (23:30 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 11 Jul 2016 20:06:44 +0000 (14:06 -0600)
Update the method of accessing the block device so that it works with
CONFIG_BLK enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/spl/spl_mmc.c

index c44f1b5dc84299639802e3a306f4a7ca3603ba68..6b3e9e4a17a0e6be63179c9a944fb98313d3d76e 100644 (file)
@@ -184,7 +184,7 @@ static int mmc_load_image_raw_os(struct mmc *mmc)
        unsigned long count;
        int ret;
 
-       count = mmc->block_dev.block_read(&mmc->block_dev,
+       count = blk_dread(mmc_get_blk_desc(mmc),
                CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR,
                CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS,
                (void *) CONFIG_SYS_SPL_ARGS_ADDR);
@@ -225,13 +225,13 @@ int spl_mmc_do_fs_boot(struct mmc *mmc)
 
 #ifdef CONFIG_SPL_FAT_SUPPORT
        if (!spl_start_uboot()) {
-               err = spl_load_image_fat_os(&mmc->block_dev,
+               err = spl_load_image_fat_os(mmc_get_blk_desc(mmc),
                        CONFIG_SYS_MMCSD_FS_BOOT_PARTITION);
                if (!err)
                        return err;
        }
 #ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
-       err = spl_load_image_fat(&mmc->block_dev,
+       err = spl_load_image_fat(mmc_get_blk_desc(mmc),
                                 CONFIG_SYS_MMCSD_FS_BOOT_PARTITION,
                                 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME);
        if (!err)