diff options
author | Simon Glass <sjg@chromium.org> | 2016-05-14 14:03:06 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-05-27 10:23:09 -0600 |
commit | ef5609c33fc6a8323613a296f08c8efa3161d77f (patch) | |
tree | 8972bd470fce44e000813ff92020fd2f119260c6 /common/spl/spl_mmc.c | |
parent | 487d756f78629f5e9465c7ace2c14ef51401bc3b (diff) | |
download | u-boot-ef5609c33fc6a8323613a296f08c8efa3161d77f.tar.gz u-boot-ef5609c33fc6a8323613a296f08c8efa3161d77f.tar.xz u-boot-ef5609c33fc6a8323613a296f08c8efa3161d77f.zip |
dm: mmc: spl: Add support for CONFIG_BLK
Allow driver model to be used for block devices in SPL.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/spl/spl_mmc.c')
-rw-r--r-- | common/spl/spl_mmc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c index 5676acdde3..6adfc9b8e5 100644 --- a/common/spl/spl_mmc.c +++ b/common/spl/spl_mmc.c @@ -34,9 +34,8 @@ static int mmc_load_legacy(struct mmc *mmc, ulong sector, mmc->read_bl_len; /* Read the header too to avoid extra memcpy */ - count = mmc->block_dev.block_read(&mmc->block_dev, sector, - image_size_sectors, - (void *)(ulong)spl_image.load_addr); + count = blk_dread(mmc_get_blk_desc(mmc), sector, image_size_sectors, + (void *)(ulong)spl_image.load_addr); debug("read %x sectors to %x\n", image_size_sectors, spl_image.load_addr); if (count != image_size_sectors) @@ -50,7 +49,7 @@ static ulong h_spl_load_read(struct spl_load_info *load, ulong sector, { struct mmc *mmc = load->dev; - return mmc->block_dev.block_read(&mmc->block_dev, sector, count, buf); + return blk_dread(mmc_get_blk_desc(mmc), sector, count, buf); } static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector) @@ -63,7 +62,7 @@ static int mmc_load_image_raw_sector(struct mmc *mmc, unsigned long sector) sizeof(struct image_header)); /* read image header to find the image size & load address */ - count = mmc->block_dev.block_read(&mmc->block_dev, sector, 1, header); + count = blk_dread(mmc_get_blk_desc(mmc), sector, 1, header); debug("hdr read sector %lx, count=%lu\n", sector, count); if (count == 0) { ret = -EIO; |