mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
dfu: Rename _FUNCTION_DFU to DFU_OVER_
Do the following to make the symbol names less confusing. sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \ `git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u` Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
2
README
2
README
@@ -1198,7 +1198,7 @@ The following options need to be configured:
|
|||||||
key for the Replay Protection Memory Block partition in eMMC.
|
key for the Replay Protection Memory Block partition in eMMC.
|
||||||
|
|
||||||
- USB Device Firmware Update (DFU) class support:
|
- USB Device Firmware Update (DFU) class support:
|
||||||
CONFIG_USB_FUNCTION_DFU
|
CONFIG_DFU_OVER_USB
|
||||||
This enables the USB portion of the DFU USB class
|
This enables the USB portion of the DFU USB class
|
||||||
|
|
||||||
CONFIG_DFU_MMC
|
CONFIG_DFU_MMC
|
||||||
|
@@ -144,7 +144,7 @@ int factoryset_read_eeprom(int i2c_addr)
|
|||||||
unsigned char eeprom_buf[0x3c00], hdr[4], buf[MAX_STRING_LENGTH];
|
unsigned char eeprom_buf[0x3c00], hdr[4], buf[MAX_STRING_LENGTH];
|
||||||
unsigned char *cp, *cp1;
|
unsigned char *cp, *cp1;
|
||||||
|
|
||||||
#if defined(CONFIG_USB_FUNCTION_DFU)
|
#if defined(CONFIG_DFU_OVER_USB)
|
||||||
factory_dat.usb_vendor_id = CONFIG_USB_GADGET_VENDOR_NUM;
|
factory_dat.usb_vendor_id = CONFIG_USB_GADGET_VENDOR_NUM;
|
||||||
factory_dat.usb_product_id = CONFIG_USB_GADGET_PRODUCT_NUM;
|
factory_dat.usb_product_id = CONFIG_USB_GADGET_PRODUCT_NUM;
|
||||||
#endif
|
#endif
|
||||||
@@ -202,7 +202,7 @@ int factoryset_read_eeprom(int i2c_addr)
|
|||||||
cp1 += 3;
|
cp1 += 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_USB_FUNCTION_DFU)
|
#if defined(CONFIG_DFU_OVER_USB)
|
||||||
/* read vid and pid for dfu mode */
|
/* read vid and pid for dfu mode */
|
||||||
if (0 <= get_factory_record_val(cp, size, (uchar *)"USBD1",
|
if (0 <= get_factory_record_val(cp, size, (uchar *)"USBD1",
|
||||||
(uchar *)"vid", buf,
|
(uchar *)"vid", buf,
|
||||||
|
12
cmd/dfu.c
12
cmd/dfu.c
@@ -25,14 +25,14 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
if (argc < 4)
|
if (argc < 4)
|
||||||
return CMD_RET_USAGE;
|
return CMD_RET_USAGE;
|
||||||
|
|
||||||
#ifdef CONFIG_USB_FUNCTION_DFU
|
#ifdef CONFIG_DFU_OVER_USB
|
||||||
char *usb_controller = argv[1];
|
char *usb_controller = argv[1];
|
||||||
#endif
|
#endif
|
||||||
char *interface = argv[2];
|
char *interface = argv[2];
|
||||||
char *devstring = argv[3];
|
char *devstring = argv[3];
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
#ifdef CONFIG_TFTP_FUNCTION_DFU
|
#ifdef CONFIG_DFU_OVER_TFTP
|
||||||
unsigned long addr = 0;
|
unsigned long addr = 0;
|
||||||
if (!strcmp(argv[1], "tftp")) {
|
if (!strcmp(argv[1], "tftp")) {
|
||||||
if (argc == 5)
|
if (argc == 5)
|
||||||
@@ -41,7 +41,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
return update_tftp(addr, interface, devstring);
|
return update_tftp(addr, interface, devstring);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_USB_FUNCTION_DFU
|
#ifdef CONFIG_DFU_OVER_USB
|
||||||
ret = dfu_init_env_entities(interface, devstring);
|
ret = dfu_init_env_entities(interface, devstring);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto done;
|
goto done;
|
||||||
@@ -64,15 +64,15 @@ done:
|
|||||||
|
|
||||||
U_BOOT_CMD(dfu, CONFIG_SYS_MAXARGS, 1, do_dfu,
|
U_BOOT_CMD(dfu, CONFIG_SYS_MAXARGS, 1, do_dfu,
|
||||||
"Device Firmware Upgrade",
|
"Device Firmware Upgrade",
|
||||||
#ifdef CONFIG_USB_FUNCTION_DFU
|
#ifdef CONFIG_DFU_OVER_USB
|
||||||
"<USB_controller> <interface> <dev> [list]\n"
|
"<USB_controller> <interface> <dev> [list]\n"
|
||||||
" - device firmware upgrade via <USB_controller>\n"
|
" - device firmware upgrade via <USB_controller>\n"
|
||||||
" on device <dev>, attached to interface\n"
|
" on device <dev>, attached to interface\n"
|
||||||
" <interface>\n"
|
" <interface>\n"
|
||||||
" [list] - list available alt settings\n"
|
" [list] - list available alt settings\n"
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_TFTP_FUNCTION_DFU
|
#ifdef CONFIG_DFU_OVER_TFTP
|
||||||
#ifdef CONFIG_USB_FUNCTION_DFU
|
#ifdef CONFIG_DFU_OVER_USB
|
||||||
"dfu "
|
"dfu "
|
||||||
#endif
|
#endif
|
||||||
"tftp <interface> <dev> [<addr>]\n"
|
"tftp <interface> <dev> [<addr>]\n"
|
||||||
|
@@ -67,7 +67,7 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTSTAGE) += bootstage.o
|
|||||||
|
|
||||||
ifdef CONFIG_SPL_BUILD
|
ifdef CONFIG_SPL_BUILD
|
||||||
ifdef CONFIG_SPL_DFU_SUPPORT
|
ifdef CONFIG_SPL_DFU_SUPPORT
|
||||||
obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
|
obj-$(CONFIG_DFU_OVER_USB) += dfu.o
|
||||||
endif
|
endif
|
||||||
obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
|
obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
|
||||||
obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
|
obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
|
||||||
@@ -130,7 +130,7 @@ endif
|
|||||||
|
|
||||||
obj-y += cli.o
|
obj-y += cli.o
|
||||||
obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_simple.o cli_readline.o
|
obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_simple.o cli_readline.o
|
||||||
obj-$(CONFIG_USB_FUNCTION_DFU) += dfu.o
|
obj-$(CONFIG_DFU_OVER_USB) += dfu.o
|
||||||
obj-y += command.o
|
obj-y += command.o
|
||||||
obj-$(CONFIG_$(SPL_)LOG) += log.o
|
obj-$(CONFIG_$(SPL_)LOG) += log.o
|
||||||
obj-$(CONFIG_$(SPL_)LOG_CONSOLE) += log_console.o
|
obj-$(CONFIG_$(SPL_)LOG_CONSOLE) += log_console.o
|
||||||
|
@@ -2,21 +2,21 @@ menu "DFU support"
|
|||||||
|
|
||||||
config DFU
|
config DFU
|
||||||
bool
|
bool
|
||||||
imply USB_FUNCTION_DFU if USB_GADGET
|
imply DFU_OVER_USB if USB_GADGET
|
||||||
|
|
||||||
config USB_FUNCTION_DFU
|
config DFU_OVER_USB
|
||||||
bool
|
bool
|
||||||
select HASH
|
select HASH
|
||||||
depends on USB_GADGET
|
depends on USB_GADGET
|
||||||
|
|
||||||
config TFTP_FUNCTION_DFU
|
config DFU_OVER_TFTP
|
||||||
bool
|
bool
|
||||||
depends on NET
|
depends on NET
|
||||||
|
|
||||||
if DFU
|
if DFU
|
||||||
config DFU_TFTP
|
config DFU_TFTP
|
||||||
bool "DFU via TFTP"
|
bool "DFU via TFTP"
|
||||||
select TFTP_FUNCTION_DFU
|
select DFU_OVER_TFTP
|
||||||
help
|
help
|
||||||
This option allows performing update of DFU-managed medium with data
|
This option allows performing update of DFU-managed medium with data
|
||||||
sent via TFTP boot.
|
sent via TFTP boot.
|
||||||
|
@@ -26,7 +26,7 @@ obj-$(CONFIG_CI_UDC) += ci_udc.o
|
|||||||
ifndef CONFIG_SPL_BUILD
|
ifndef CONFIG_SPL_BUILD
|
||||||
obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
|
obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
|
||||||
obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
|
obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
|
||||||
obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o
|
obj-$(CONFIG_DFU_OVER_USB) += f_dfu.o
|
||||||
obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o
|
obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o
|
||||||
obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o
|
obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o
|
||||||
obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
|
obj-$(CONFIG_USB_FUNCTION_SDP) += f_sdp.o
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
/*
|
/*
|
||||||
* Size of malloc() pool
|
* Size of malloc() pool
|
||||||
*/
|
*/
|
||||||
#ifdef CONFIG_USB_FUNCTION_DFU
|
#ifdef CONFIG_DFU_OVER_USB
|
||||||
#define CONFIG_SYS_MALLOC_LEN (SZ_4M + \
|
#define CONFIG_SYS_MALLOC_LEN (SZ_4M + \
|
||||||
CONFIG_SYS_DFU_DATA_BUF_SIZE + \
|
CONFIG_SYS_DFU_DATA_BUF_SIZE + \
|
||||||
CONFIG_SYS_DFU_MAX_FILE_SIZE)
|
CONFIG_SYS_DFU_MAX_FILE_SIZE)
|
||||||
|
Reference in New Issue
Block a user