aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorIgor Opaniuk <igor.opaniuk@linaro.org>2018-07-17 14:33:26 +0300
committerTom Rini <trini@konsulko.com>2018-07-24 09:25:23 -0400
commite9ee7398d64796d441067d5456b6e65780d11dbd (patch)
tree3acb8b2c00534b8bdaf6564ccbf5fd3bb30f3401 /common
parentb0aa74a2640cd1be1d9bdfd8024ed3faa119e447 (diff)
downloadu-boot-e9ee7398d64796d441067d5456b6e65780d11dbd.zip
u-boot-e9ee7398d64796d441067d5456b6e65780d11dbd.tar.gz
u-boot-e9ee7398d64796d441067d5456b6e65780d11dbd.tar.bz2
avb2.0: use block API in AVB ops
Use blk_dread()/blk_dwrite() in mmc_read()/mmc_write() AVB operation implementations. This fixes compilation issues when CONFIG_BLK is enabled. Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org> Tested-by: Eugeniu Rosca <rosca.eugeniu@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/avb_verify.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/avb_verify.c b/common/avb_verify.c
index f9a00f8..20e35ad 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -5,6 +5,7 @@
*/
#include <avb_verify.h>
+#include <blk.h>
#include <fastboot.h>
#include <image.h>
#include <malloc.h>
@@ -288,8 +289,8 @@ static unsigned long mmc_read_and_flush(struct mmc_part *part,
tmp_buf = buffer;
}
- blks = part->mmc->block_dev.block_read(part->mmc_blk,
- start, sectors, tmp_buf);
+ blks = blk_dread(part->mmc_blk,
+ start, sectors, tmp_buf);
/* flush cache after read */
flush_cache((ulong)tmp_buf, sectors * part->info.blksz);
@@ -327,8 +328,8 @@ static unsigned long mmc_write(struct mmc_part *part, lbaint_t start,
tmp_buf = buffer;
}
- return part->mmc->block_dev.block_write(part->mmc_blk,
- start, sectors, tmp_buf);
+ return blk_dwrite(part->mmc_blk,
+ start, sectors, tmp_buf);
}
static struct mmc_part *get_partition(AvbOps *ops, const char *partition)