#ifdef CONFIG_MISC_INIT_R
int misc_init_r(void)
{
-#ifdef CONFIG_SET_DFU_ALT_INFO
- set_dfu_alt_info();
-#endif
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
set_board_info();
#endif
DECLARE_GLOBAL_DATA_PTR;
#ifdef CONFIG_SET_DFU_ALT_INFO
-void set_dfu_alt_info(void)
+void set_dfu_alt_info(char *interface, char *devstr)
{
size_t buf_size = CONFIG_SET_DFU_ALT_BUF_LEN;
ALLOC_CACHE_ALIGN_BUFFER(char, buf, buf_size);
puts("DFU alt info setting: ");
- alt_setting = get_dfu_alt_boot();
+ alt_setting = get_dfu_alt_boot(interface, devstr);
if (alt_setting) {
setenv("dfu_alt_boot", alt_setting);
offset = snprintf(buf, buf_size, "%s", alt_setting);
}
- alt_setting = get_dfu_alt_system();
+ alt_setting = get_dfu_alt_system(interface, devstr);
if (alt_setting) {
if (offset)
alt_sep = ";";
char *env_bkp;
int ret;
+#ifdef CONFIG_SET_DFU_ALT_INFO
+ set_dfu_alt_info(interface, devstr);
+#endif
str_env = getenv("dfu_alt_info");
if (!str_env) {
error("\"dfu_alt_info\" env variable not defined!\n");
unsigned int inited:1;
};
+#ifdef CONFIG_SET_DFU_ALT_INFO
+void set_dfu_alt_info(char *interface, char *devstr);
+#endif
int dfu_config_entities(char *s, char *interface, char *devstr);
void dfu_free_entities(void);
void dfu_show_entities(void);
#endif
#ifdef CONFIG_SET_DFU_ALT_INFO
-char *get_dfu_alt_system(void);
-char *get_dfu_alt_boot(void);
-void set_dfu_alt_info(void);
+char *get_dfu_alt_system(char *interface, char *devstr);
+char *get_dfu_alt_boot(char *interface, char *devstr);
#endif
#ifdef CONFIG_BOARD_TYPES
void set_board_type(void);