aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/fastboot/fb_mmc.c2
-rw-r--r--include/image-sparse.h2
-rw-r--r--lib/image-sparse.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
index 9d25c402028..060918e4910 100644
--- a/drivers/fastboot/fb_mmc.c
+++ b/drivers/fastboot/fb_mmc.c
@@ -19,8 +19,6 @@
#include <linux/compat.h>
#include <android_image.h>
-#define FASTBOOT_MAX_BLK_WRITE 16384
-
#define BOOT_PARTITION_NAME "boot"
struct fb_mmc_sparse {
diff --git a/include/image-sparse.h b/include/image-sparse.h
index 0572dbd0a28..282a0b25649 100644
--- a/include/image-sparse.h
+++ b/include/image-sparse.h
@@ -7,6 +7,8 @@
#include <part.h>
#include <sparse_format.h>
+#define FASTBOOT_MAX_BLK_WRITE 16384
+
#define ROUNDUP(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
struct sparse_storage {
diff --git a/lib/image-sparse.c b/lib/image-sparse.c
index 5ec0f94ab3e..8f8a67e1580 100644
--- a/lib/image-sparse.c
+++ b/lib/image-sparse.c
@@ -55,7 +55,8 @@ static lbaint_t write_sparse_chunk_raw(struct sparse_storage *info,
void *data,
char *response)
{
- lbaint_t n = blkcnt, write_blks, blks = 0, aligned_buf_blks = 100;
+ lbaint_t n = blkcnt, write_blks, blks = 0;
+ lbaint_t aligned_buf_blks = FASTBOOT_MAX_BLK_WRITE;
uint32_t *aligned_buf = NULL;
if (CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) {