[U-Boot] [PATCH 1/4] dfu: Export allocated dfu buffer size

Lukasz Majewski l.majewski at samsung.com
Mon Dec 9 16:20:13 CET 2013


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 <l.majewski at samsung.com>
---
 drivers/dfu/dfu.c |    5 +++++
 include/dfu.h     |    1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 1eb92e5..07011e9 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -74,6 +74,11 @@ unsigned char *dfu_free_buf(void)
 	return dfu_buf;
 }
 
+unsigned long dfu_get_buf_size(void)
+{
+	return dfu_buf_size;
+}
+
 unsigned char *dfu_get_buf(void)
 {
 	char *s;
diff --git a/include/dfu.h b/include/dfu.h
index cc14044..9a50721 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);
-- 
1.7.10.4



More information about the U-Boot mailing list