diff options
| author | Aswath Govindraju <[email protected]> | 2021-06-01 16:51:47 +0530 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-06-08 21:38:53 -0400 |
| commit | 8e3ea2da729df07f296611abeabba6cc67333daa (patch) | |
| tree | a44e183bc4181581fa83309dd354e476a499683f /drivers | |
| parent | 2509493cc1482b2b07ea6fd883960cd6bc068af5 (diff) | |
usb: dfu: Migrate CONFIG_SYS_DFU_DATA_BUF_SIZE and CONFIG_SYS_DFU_MAX_FILE_SIZE to Kconfig
Currently the config options CONFIG_SYS_DFU_DATA_BUF_SIZE and
CONFIG_SYS_DFU_MAX_FILE_SIZE are being set in include/configs/<board>.h
files and also in <board_name>_defconfig files without a Kconfig option. It
is easier for users to set these configs in defconfig files than in config
header files as they are a part of the source code.
Add Kconfig symbols, and update the defconfigs by using tools/moveconfig.py
script.
Suggested-by: Pratyush Yadav <[email protected]>
Signed-off-by: Aswath Govindraju <[email protected]>
Acked-by: Oleksandr Suvorov <[email protected]>
Acked-by: Matthias Brugger <[email protected]>
Acked-by: Lukasz Majewski <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/dfu/Kconfig | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig index 121dc54f546..b50547476cb 100644 --- a/drivers/dfu/Kconfig +++ b/drivers/dfu/Kconfig @@ -92,5 +92,25 @@ config SET_DFU_ALT_INFO help This option allows to call the function set_dfu_alt_info to dynamically build dfu_alt_info in board. + +config SYS_DFU_DATA_BUF_SIZE + hex "Size of buffer to be allocated for transfer to raw storage device" + default 0x800000 + help + DFU transfer uses a buffer before writing data to the + raw storage device. This value can be used for setting the + size of this buffer. The size of the buffer is also configurable + through the "dfu_bufsiz" environment variable. If both are + given the size of the buffer is set to "dfu_bufsize". + +config SYS_DFU_MAX_FILE_SIZE + hex "Size of the buffer to be allocated for transferring files" + default SYS_DFU_DATA_BUF_SIZE + help + When updating files rather than the raw storage device, + we use a static buffer to copy the file into and then write + the buffer once we've been given the whole file. Define + this to the maximum filesize (in bytes) for the buffer. + If undefined it defaults to the CONFIG_SYS_DFU_DATA_BUF_SIZE. endif endmenu |
