From patchwork Fri May 27 13:39:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "B, Ravi" X-Patchwork-Id: 627178 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3rGRwg4v6nz9sdm for ; Fri, 27 May 2016 23:40:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EFD0BB3862; Fri, 27 May 2016 15:40:27 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 53Wq0Po5fpAr; Fri, 27 May 2016 15:40:27 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CB20EB37F2; Fri, 27 May 2016 15:40:16 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FBABA7498 for ; Fri, 27 May 2016 15:39:57 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LMydOqijX1Un for ; Fri, 27 May 2016 15:39:57 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by theia.denx.de (Postfix) with ESMTPS id 08DE1A775D for ; Fri, 27 May 2016 15:39:53 +0200 (CEST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u4RDdmNi002010; Fri, 27 May 2016 08:39:48 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4RDdniq005911; Fri, 27 May 2016 08:39:49 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Fri, 27 May 2016 08:39:49 -0500 Received: from uda0393587.apr.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4RDdYFO012677; Fri, 27 May 2016 08:39:47 -0500 From: Ravi Babu To: Date: Fri, 27 May 2016 19:09:33 +0530 Message-ID: <1464356373-8375-6-git-send-email-ravibabu@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1464356373-8375-1-git-send-email-ravibabu@ti.com> References: <1464356373-8375-1-git-send-email-ravibabu@ti.com> MIME-Version: 1.0 Cc: marex@denx.de, trini@konsulko.com Subject: [U-Boot] [RFC PATCH 5/5] dra7x: spl: dfu: adding SPL-DFU support for dra7x platform X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 --- 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 #include #include +#include #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