u-boot-brain/include/configs/tegra-common-usb-gadget.h
Stephen Warren f69d72ee2a ARM: tegra: tweak DFU buffer sizes
CONFIG_SYS_DFU_DATA_BUF_SIZE defines the size of chunks transferred
across USB. This doesn't need to be particularly large, since it doesn't
limit the overall transfer size.

CONFIG_SYS_DFU_MAX_FILE_SIZE is used to buffer an entire file before
writing it to a filesystem. This define limits the maximum file size that
may be transferred. Bump this up to 32MiB in order to support large
uncompressed kernel images.

Both of these buffers are dynamically allocated, and so the size of both
needs to be taken into account when calculating the required malloc
region size.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
2015-09-11 17:15:25 -04:00

45 lines
1.1 KiB
C

/*
* (C) Copyright 2014
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0
*/
#ifndef _TEGRA_COMMON_USB_GADGET_H_
#define _TEGRA_COMMON_USB_GADGET_H_
#ifndef CONFIG_SPL_BUILD
/* USB gadget mode support*/
#define CONFIG_USB_GADGET
#define CONFIG_USB_GADGET_VBUS_DRAW 2
#define CONFIG_CI_UDC
#define CONFIG_CI_UDC_HAS_HOSTPC
#define CONFIG_USB_GADGET_DUALSPEED
#ifndef CONFIG_G_DNL_VENDOR_NUM
#define CONFIG_G_DNL_VENDOR_NUM 0x0955
#endif
#ifndef CONFIG_G_DNL_PRODUCT_NUM
#define CONFIG_G_DNL_PRODUCT_NUM 0x701A
#endif
#ifndef CONFIG_G_DNL_MANUFACTURER
#define CONFIG_G_DNL_MANUFACTURER "NVIDIA"
#endif
#define CONFIG_USB_GADGET_DOWNLOAD
/* USB mass storage protocol */
#define CONFIG_USB_FUNCTION_MASS_STORAGE
#define CONFIG_CMD_USB_MASS_STORAGE
/* DFU protocol */
#define CONFIG_USB_FUNCTION_DFU
#define CONFIG_SYS_DFU_DATA_BUF_SIZE SZ_1M
#define CONFIG_SYS_DFU_MAX_FILE_SIZE SZ_32M
#define CONFIG_CMD_DFU
#ifdef CONFIG_MMC
#define CONFIG_DFU_MMC
#endif
#ifdef CONFIG_SPI_FLASH
#define CONFIG_DFU_SF
#endif
#endif
#endif /* _TEGRA_COMMON_USB_GADGET_H_ */