Skip to content
Snippets Groups Projects
Commit e9ee7398 authored by Igor Opaniuk's avatar Igor Opaniuk Committed by Tom Rini
Browse files

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: default avatarIgor Opaniuk <igor.opaniuk@linaro.org>
Tested-by: default avatarEugeniu Rosca <rosca.eugeniu@gmail.com>
parent b0aa74a2
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment