]> git.sur5r.net Git - u-boot/commitdiff
dra7x: boot: add dfu bootmode support
authorB, Ravi <ravibabu@ti.com>
Thu, 28 Jul 2016 12:09:17 +0000 (17:39 +0530)
committerMarek Vasut <marex@denx.de>
Tue, 27 Sep 2016 21:30:20 +0000 (23:30 +0200)
This patch enables the DFU boot mode support
for dra7x platform.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/cpu/armv7/omap-common/boot-common.c
arch/arm/include/asm/arch-omap5/spl.h
common/spl/spl.c

index 60c367a2020110b0a44d584f5482887d3a9bd307..385310ba1ec95825292f55824710a8e18c087275 100644 (file)
@@ -90,6 +90,11 @@ void save_omap_boot_params(void)
                case BOOT_DEVICE_CPGMAC:
                        sys_boot_device = 1;
                        break;
+#endif
+#if defined(BOOT_DEVICE_DFU) && !defined(CONFIG_SPL_DFU_SUPPORT)
+               case BOOT_DEVICE_DFU:
+                       sys_boot_device = 1;
+                       break;
 #endif
        }
 
index 468ff5afd54738f7cd89466bfe0e8e916d598e15..35828804242a844758e5684050d5808741e293d4 100644 (file)
@@ -20,7 +20,7 @@
 #define BOOT_DEVICE_QSPI_1     0x0A
 #define BOOT_DEVICE_QSPI_4     0x0B
 #define BOOT_DEVICE_UART       0x43
-#define BOOT_DEVICE_USB                0x45
+#define BOOT_DEVICE_DFU                0x45
 
 #define MMC_BOOT_DEVICES_START BOOT_DEVICE_MMC1
 #define MMC_BOOT_DEVICES_END   BOOT_DEVICE_MMC2_2
index e14ec8052e9a075b9dfde8642f9c5c04c53e03d4..57b73af4a740b5011264a5b928a53fd58122994a 100644 (file)
@@ -174,7 +174,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
 # define CONFIG_SPL_LOAD_FIT_ADDRESS   0
 #endif
 
-#ifdef CONFIG_SPL_RAM_DEVICE
+#if defined(CONFIG_SPL_RAM_DEVICE) || defined(CONFIG_SPL_DFU_SUPPORT)
 static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector,
                               ulong count, void *buf)
 {
@@ -312,6 +312,9 @@ struct boot_device_name boot_name_table[] = {
 #ifdef CONFIG_SPL_USB_SUPPORT
        { BOOT_DEVICE_USB, "USB" },
 #endif
+#ifdef CONFIG_SPL_DFU_SUPPORT
+       { BOOT_DEVICE_DFU, "USB DFU" },
+#endif
 #ifdef CONFIG_SPL_SATA_SUPPORT
        { BOOT_DEVICE_SATA, "SATA" },
 #endif
@@ -398,6 +401,11 @@ static int spl_load_image(u32 boot_device)
        case BOOT_DEVICE_USB:
                return spl_usb_load_image();
 #endif
+#ifdef CONFIG_SPL_DFU_SUPPORT
+       case BOOT_DEVICE_DFU:
+               spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0");
+               return spl_ram_load_image();
+#endif
 #ifdef CONFIG_SPL_SATA_SUPPORT
        case BOOT_DEVICE_SATA:
                return spl_sata_load_image();