From patchwork Fri May 27 13:39:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "B, Ravi" X-Patchwork-Id: 627176 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 3rGRwT2rCbz9sdm for ; Fri, 27 May 2016 23:40:25 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6331BB3870; Fri, 27 May 2016 15:40:20 +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 fQA641Ww2KzH; Fri, 27 May 2016 15:40:20 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 33F4CA77A4; Fri, 27 May 2016 15:40:14 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E90E6A7518 for ; Fri, 27 May 2016 15:39:54 +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 cQqUweTsWrto for ; Fri, 27 May 2016 15:39:54 +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 arroyo.ext.ti.com (arroyo.ext.ti.com [198.47.19.12]) by theia.denx.de (Postfix) with ESMTPS id 81160A7498 for ; Fri, 27 May 2016 15:39:51 +0200 (CEST) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u4RDdl6w023433; Fri, 27 May 2016 08:39:47 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4RDdl4H005891; Fri, 27 May 2016 08:39:47 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Fri, 27 May 2016 08:39:46 -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 u4RDdYFN012677; Fri, 27 May 2016 08:39:45 -0500 From: Ravi Babu To: Date: Fri, 27 May 2016 19:09:32 +0530 Message-ID: <1464356373-8375-5-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 4/5] dfu: spl: add generic spl-dfu function in common-spl 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" Add generic spl-dfu function in common-spl, specific implemention for configuring dfu memory device is done in platform board specific source file. Signed-off-by: Ravi Babu Reviewed-by: Lukasz Majewski --- common/spl/spl.c | 11 +++++++++++ include/spl.h | 1 + 2 files changed, 12 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index 82e7f58..ef6d2d1 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -273,6 +273,13 @@ static void announce_boot_device(u32 boot_device) static inline void announce_boot_device(u32 boot_device) { } #endif +#ifdef CONFIG_SPL_DFU +__weak int spl_run_dfu(void) +{ + return 0; +} +#endif + static int spl_load_image(u32 boot_device) { switch (boot_device) { @@ -367,6 +374,10 @@ void board_init_r(gd_t *dummy1, ulong dummy2) spl_board_init(); #endif +#ifdef CONFIG_SPL_DFU + spl_run_dfu(); +#endif + board_boot_order(spl_boot_list); for (i = 0; i < ARRAY_SIZE(spl_boot_list) && spl_boot_list[i] != BOOT_DEVICE_NONE; i++) { diff --git a/include/spl.h b/include/spl.h index 5f0b0db..5794b05 100644 --- a/include/spl.h +++ b/include/spl.h @@ -158,4 +158,5 @@ void spl_board_init(void); */ bool spl_was_boot_source(void); +int spl_run_dfu(void); #endif