From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 4 Jun 2013 16:04:21 -0400 Subject: [U-Boot] dfu: make data buffer size configurable In-Reply-To: <1370337774-16768-1-git-send-email-hs@denx.de> References: <1370337774-16768-1-git-send-email-hs@denx.de> Message-ID: <20130604200421.GC9632@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jun 04, 2013 at 11:22:54AM +0200, Heiko Schocher wrote: > Dfu transfer uses a buffer before writing data to the > raw storage device. Make the size (in bytes) of this buffer > configurable. NAK. > + CONFIG_SYS_DFU_DATA_BUF_SIZE > + Dfu transfer uses a buffer before writing data to the > + raw storage device. Make the size (in bytes) of this buffer > + configurable. > + > CONFIG_SYS_DFU_MAX_FILE_SIZE > When updating files rather than the raw storage device, > we use a static buffer to copy the file into and then write The point of the buffer being configurable is to allow for larger files, right? We need to fix CONFIG_SYS_DFU_MAX_FILE_SIZE so that.. > -#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 We use one variable for both spots. Or is there some case I'm missing where we need to buffer 8MiB at a time for raw writes? In which case we still need to make CONFIG_SYS_DFU_MAX_FILE_SIZE be used :) -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: