board: artik710_raptor: override set_dfu_alt_info
authorChanho Park <chanho61.park@samsung.com>
Mon, 15 May 2017 01:59:21 +0000 (10:59 +0900)
committerChanho Park <chanho61.park@samsung.com>
Mon, 15 May 2017 02:30:01 +0000 (11:30 +0900)
This 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: I9b1f5b9ae6f54b687456469162beb30e9f84b055
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
board/s5p6818/artik710_raptor/board.c

index e91f60f0ebdc2010fc72d50f5e786b854041da33..ce791bd4a1244fb2d1bbb9c687e65eee84dae1bd 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <asm/arch/nexell.h>
 #include <asm/arch/nx_gpio.h>
+#include <memalign.h>
 
 #ifdef CONFIG_DM_PMIC_NXE2000
 #include <dm.h>
@@ -127,6 +128,17 @@ static void get_sensorid(u32 revision)
 }
 #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.
  */