[U-Boot] [RFC PATCH 5/5] dra7x: spl: dfu: adding SPL-DFU support for dra7x platform

Ravi Babu ravibabu at ti.com
Fri May 27 15:39:33 CEST 2016


Adding SPL-DFU support for dra7x platform. The DFU
support for dra7x includes QSPI, MMC/SD and eMMC
memory devices. The SPL-DFU memory devices can be
selected through meunconfig->Boot Images.

Signed-off-by: Ravi Babu <ravibabu at ti.com>
---
 board/ti/dra7xx/evm.c             |   20 ++++++++++++++++++++
 include/configs/dra7xx_evm.h      |    3 +--
 include/configs/ti_omap5_common.h |    2 --
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
index f194999..0ce0e97 100644
--- a/board/ti/dra7xx/evm.c
+++ b/board/ti/dra7xx/evm.c
@@ -30,6 +30,7 @@
 #include <miiphy.h>
 #include <spl.h>
 #include <pcf8575.h>
+#include <dfu.h>
 
 #include "mux_data.h"
 #include "../common/board_detect.h"
@@ -619,6 +620,25 @@ int spl_start_uboot(void)
 }
 #endif
 
+#ifdef CONFIG_SPL_DFU
+int spl_run_dfu(void)
+{
+#ifdef CONFIG_SPL_DFU_EMMC
+	return dfu_run_mmc(0, 1, "dfu_alt_info_emmc");
+#endif
+
+#ifdef CONFIG_SPL_DFU_MMC
+	return dfu_run_mmc(0, 0, "dfu_alt_info_mmc");
+#endif
+
+#ifdef CONFIG_SPL_DFU
+	return dfu_run_cmd("dfu_alt_info_qspi",
+		"dfu 0 sf 0:0:64000000:0");
+#endif
+	return 0;
+}
+#endif
+
 #ifdef CONFIG_DRIVER_TI_CPSW
 extern u32 *const omap_si_rev;
 
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index da84f1c..ec10cd8 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -44,7 +44,6 @@
 
 #define CONFIG_SYS_OMAP_ABE_SYSCK
 
-#ifndef CONFIG_SPL_BUILD
 /* Define the default GPT table for eMMC */
 #define PARTS_DEFAULT \
 	/* Linux partitions */ \
@@ -122,6 +121,7 @@
 	DFU_ALT_INFO_QSPI
 
 /* Fastboot */
+#ifndef CONFIG_SPL_BUILD
 #define CONFIG_USB_FUNCTION_FASTBOOT
 #define CONFIG_CMD_FASTBOOT
 #define CONFIG_ANDROID_BOOT_IMAGE
@@ -331,5 +331,4 @@
 /* pcf support */
 #define CONFIG_PCF8575
 #define CONFIG_SYS_I2C_PCF8575_CHIP { {0x21, 0xeaf7} }
-
 #endif /* __CONFIG_DRA7XX_EVM_H */
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index 59f0f70..f9c6576 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -66,7 +66,6 @@
 #define DFUARGS
 #endif
 
-#ifndef CONFIG_SPL_BUILD
 #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	DEFAULT_LINUX_BOOT_ENV \
@@ -136,7 +135,6 @@
 	"setenv mmcroot /dev/mmcblk0p2 rw; " \
 	"run mmcboot;" \
 	""
-#endif
 
 /*
  * SPL related defines.  The Public RAM memory map the ROM defines the
-- 
1.7.9.5



More information about the U-Boot mailing list