Thie patch defines set_dfu_alt_info to evaluate the environment
variables on runtime. Typically, the dfu_alt_info can be determined
statically on compile time. To convert the values on runtime, the
setenv command can evaluate the variables.
Change-Id: Icad4d64c7250f748a99b6a8d296a557ab27e4bbb
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
#include <asm/arch/nexell.h>
#include <asm/arch/nx_gpio.h>
+#include <memalign.h>
#ifdef CONFIG_DM_PMIC_NXE2000
#include <dm.h>
}
#endif
+#ifdef CONFIG_SET_DFU_ALT_INFO
+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);
+
+ snprintf(buf, buf_size, "setenv dfu_alt_info \"%s\"", CONFIG_DFU_ALT);
+ run_command(buf, 0);
+}
+#endif
+
/*------------------------------------------------------------------------------
* intialize nexell soc and board status.
*/