]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: tegra: tweak DFU buffer sizes
authorStephen Warren <swarren@nvidia.com>
Sat, 5 Sep 2015 04:03:49 +0000 (22:03 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 11 Sep 2015 21:15:25 +0000 (17:15 -0400)
CONFIG_SYS_DFU_DATA_BUF_SIZE defines the size of chunks transferred
across USB. This doesn't need to be particularly large, since it doesn't
limit the overall transfer size.

CONFIG_SYS_DFU_MAX_FILE_SIZE is used to buffer an entire file before
writing it to a filesystem. This define limits the maximum file size that
may be transferred. Bump this up to 32MiB in order to support large
uncompressed kernel images.

Both of these buffers are dynamically allocated, and so the size of both
needs to be taken into account when calculating the required malloc
region size.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
include/configs/tegra-common-post.h
include/configs/tegra-common-usb-gadget.h

index 594fa456d17fe6a1c7b27708a6f6025589aa28fe..651c4c4935366bf7d5df2b2eac05c6b55d947019 100644 (file)
@@ -12,8 +12,9 @@
  * Size of malloc() pool
  */
 #ifdef CONFIG_USB_FUNCTION_DFU
-#define CONFIG_SYS_MALLOC_LEN          ((4 << 20) + \
-                                               CONFIG_SYS_DFU_DATA_BUF_SIZE)
+#define CONFIG_SYS_MALLOC_LEN  (SZ_4M + \
+                                       CONFIG_SYS_DFU_DATA_BUF_SIZE + \
+                                       CONFIG_SYS_DFU_MAX_FILE_SIZE)
 #else
 #define CONFIG_SYS_MALLOC_LEN          (4 << 20)       /* 4MB  */
 #endif
index e51da3f40571839a2c7cc8abbf12cfbafb8ca665..b1a14cbe73b589d2fc2895a2e95a6ca949e42056 100644 (file)
@@ -30,7 +30,8 @@
 #define CONFIG_CMD_USB_MASS_STORAGE
 /* DFU protocol */
 #define CONFIG_USB_FUNCTION_DFU
-#define CONFIG_SYS_DFU_DATA_BUF_SIZE (1 * 1024 * 1024)
+#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_1M
+#define CONFIG_SYS_DFU_MAX_FILE_SIZE SZ_32M
 #define CONFIG_CMD_DFU
 #ifdef CONFIG_MMC
 #define CONFIG_DFU_MMC