From 4fb127898e46f0adf9fcca3cfae0987975ef34ec Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 9 Dec 2013 16:20:13 +0100 Subject: dfu: Export allocated dfu buffer size The method for exporting size of allocated buffer is provided. It is afterwards used by USB's dfu function code. Signed-off-by: Lukasz Majewski --- include/dfu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/dfu.h b/include/dfu.h index cc14044927..9a50721104 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -131,6 +131,7 @@ bool dfu_reset(void); int dfu_init_env_entities(char *interface, int dev); unsigned char *dfu_get_buf(void); unsigned char *dfu_free_buf(void); +unsigned long dfu_get_buf_size(void); int dfu_read(struct dfu_entity *de, void *buf, int size, int blk_seq_num); int dfu_write(struct dfu_entity *de, void *buf, int size, int blk_seq_num); -- cgit From 33fac4a6a23b595a2a3cdfa76eddde98d48947b4 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 9 Dec 2013 16:20:14 +0100 Subject: usb: dfu: f_dfu: Provide infrastructure to adjust DFU's Poll Timeout value It is necessary to deter the host from sending subsequent DFU_GETSTATUS request in the case of e.g. writing the buffer to medium. Here the timeout is increased when we fill up the whole buffer. This delay allows eMMC memory to perform its internal operations. Otherwise we end up with HOST's error regarding GET_STATUS receive timeout. Signed-off-by: Lukasz Majewski --- include/dfu.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/dfu.h b/include/dfu.h index 9a50721104..f973426aa9 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -77,6 +77,9 @@ static inline unsigned int get_mmc_blk_size(int dev) #ifndef CONFIG_SYS_DFU_MAX_FILE_SIZE #define CONFIG_SYS_DFU_MAX_FILE_SIZE CONFIG_SYS_DFU_DATA_BUF_SIZE #endif +#ifndef DFU_DEFAULT_POLL_TIMEOUT +#define DFU_DEFAULT_POLL_TIMEOUT 0 +#endif struct dfu_entity { char name[DFU_NAME_SIZE]; -- cgit From 3990994c43e3abb05c0127d19ef67d7abde3c1b7 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 9 Dec 2013 16:20:16 +0100 Subject: ARM: trats: dfu: Enable default Poll Timeout for Trats board Provide default Poll Timeout value for Trats board. Signed-off-by: Lukasz Majewski --- include/configs/trats.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/configs/trats.h b/include/configs/trats.h index 08771422ec..6cd15c25bd 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -99,6 +99,7 @@ #define CONFIG_THOR_FUNCTION #define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_32M +#define DFU_DEFAULT_POLL_TIMEOUT 300 #define CONFIG_DFU_FUNCTION #define CONFIG_DFU_MMC -- cgit