Patchwork [U-Boot,2/4] dfu: Make maximum DFU file size equal to default DFU data buffer

login
register
mail settings
Submitter Łukasz Majewski
Date Sept. 10, 2013, 1:29 p.m.
Message ID <1378819765-20159-3-git-send-email-l.majewski@samsung.com>
Download mbox | patch
Permalink /patch/273872/
State Superseded
Delegated to: Marek Vasut
Headers show

Comments

Łukasz Majewski - Sept. 10, 2013, 1:29 p.m.
Up till now the DFU maximum file size (to be written to e.g. eMMC)
was different from the DFU data buffer size. It caused errors when
one buffer was smaller than data to be written.

Now, the maximum DFU file size is equal to default DFU buffer size.
In spite of this, user is still able to manually adjust those default
values.

Change-Id: Ied75d0f7b59588ebd79dae9a22af801d36622216
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
---
 include/dfu.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Heiko Schocher - Sept. 11, 2013, 4:38 a.m.
Hello Lukasz,

Am 10.09.2013 15:29, schrieb Lukasz Majewski:
> Up till now the DFU maximum file size (to be written to e.g. eMMC)
> was different from the DFU data buffer size. It caused errors when
> one buffer was smaller than data to be written.
>
> Now, the maximum DFU file size is equal to default DFU buffer size.
> In spite of this, user is still able to manually adjust those default
> values.
>
> Change-Id: Ied75d0f7b59588ebd79dae9a22af801d36622216
> Signed-off-by: Lukasz Majewski<l.majewski@samsung.com>
> ---
>   include/dfu.h |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Tested on the dxr2 and rut board, so:

Tested-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

Patch

diff --git a/include/dfu.h b/include/dfu.h
index 47b9055..7779710 100644
--- a/include/dfu.h
+++ b/include/dfu.h
@@ -62,7 +62,7 @@  static inline unsigned int get_mmc_blk_size(int dev)
 #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 */
+#define CONFIG_SYS_DFU_MAX_FILE_SIZE CONFIG_SYS_DFU_DATA_BUF_SIZE
 #endif
 
 struct dfu_entity {