This patch enables the DFU boot mode support for dra7x platform. Signed-off-by: Ravi Babu <ravib...@ti.com> --- arch/arm/cpu/armv7/omap-common/boot-common.c | 5 +++++ arch/arm/include/asm/arch-omap5/spl.h | 2 +- common/spl/spl.c | 10 +++++++++- 3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv7/omap-common/boot-common.c b/arch/arm/cpu/armv7/omap-common/boot-common.c index 60c367a..385310b 100644 --- a/arch/arm/cpu/armv7/omap-common/boot-common.c +++ b/arch/arm/cpu/armv7/omap-common/boot-common.c @@ -91,6 +91,11 @@ void save_omap_boot_params(void) 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 } if (sys_boot_device) { diff --git a/arch/arm/include/asm/arch-omap5/spl.h b/arch/arm/include/asm/arch-omap5/spl.h index 468ff5a..3582880 100644 --- a/arch/arm/include/asm/arch-omap5/spl.h +++ b/arch/arm/include/asm/arch-omap5/spl.h @@ -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 diff --git a/common/spl/spl.c b/common/spl/spl.c index 14320fe..f82e848 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -148,7 +148,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) { @@ -286,6 +286,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 @@ -366,6 +369,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(); -- 1.7.9.5 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot