summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHeiko Schocher <[email protected]>2013-06-12 06:05:51 +0200
committerMarek Vasut <[email protected]>2013-06-30 18:41:07 +0200
commite7e75c70c5d5d3365606c4a76adb7ff4822d2f75 (patch)
treeaedfaf0f3b35a5b31260496dae82e69034717548 /include
parente6bf18dba2a21bebf2c421b1c2e188225f6485a1 (diff)
dfu: make data buffer size configurable
Dfu transfer uses a buffer before writing data to the raw storage device. Make the size (in bytes) of this buffer configurable through environment variable "dfu_bufsiz". Defaut value is configurable through CONFIG_SYS_DFU_DATA_BUF_SIZE Signed-off-by: Heiko Schocher <[email protected]> Cc: Pantelis Antoniou <[email protected]> Cc: Tom Rini <[email protected]> Cc: Lukasz Majewski <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Marek Vasut <[email protected]> Cc: Wolfgang Denk <[email protected]> Acked-by: Tom Rini <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/dfu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/dfu.h b/include/dfu.h
index a107f4b13e3..124653c8164 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -68,7 +68,9 @@ static inline unsigned int get_mmc_blk_size(int dev)
#define DFU_NAME_SIZE 32
#define DFU_CMD_BUF_SIZE 128
-#define DFU_DATA_BUF_SIZE (1024*1024*8) /* 8 MiB */
+#ifndef CONFIG_SYS_DFU_DATA_BUF_SIZE
+#define CONFIG_SYS_DFU_DATA_BUF_SIZE (1024*1024*8) /* 8 MiB */
+#endif
#ifndef CONFIG_SYS_DFU_MAX_FILE_SIZE
#define CONFIG_SYS_DFU_MAX_FILE_SIZE (4 << 20) /* 4 MiB */
#endif