From patchwork Thu Apr 27 12:15:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "B, Ravi" X-Patchwork-Id: 756017 X-Patchwork-Delegate: l.majewski@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3wDGCk0vXLz9sNF for ; Thu, 27 Apr 2017 22:17:06 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="Nz0a/att"; dkim-atps=neutral Received: by lists.denx.de (Postfix, from userid 105) id CEAADC21C64; Thu, 27 Apr 2017 12:16:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id F3369C21C52; Thu, 27 Apr 2017 12:16:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AC7A1C21C2E; Thu, 27 Apr 2017 12:16:13 +0000 (UTC) Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by lists.denx.de (Postfix) with ESMTPS id 348D7C21C2B for ; Thu, 27 Apr 2017 12:16:13 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v3RCFYOb011257; Thu, 27 Apr 2017 07:15:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1493295335; bh=oJmE1cCpPTfV9e/km2sC0+H1CafCtdDwM9nmmy36NsU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Nz0a/attMHZZFLpFT/faJittYYyzqnTP+MGyY9rih1N9fcqTHTSHoD79LnUmQgLUp ubB8CS+9GQQuS7C23yP0LgBsadszf+HU+5pP62OFCuMFq6bb9ZLK1txiwJ4WBYGfdP 8YCjSdewQ3FNOd8tfhRJE45OxKUhupsKcmwbqrHo= 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 v3RCFTeu008090; Thu, 27 Apr 2017 07:15:29 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Thu, 27 Apr 2017 07:15:29 -0500 Received: from uda0393587.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v3RCFMCX013621; Thu, 27 Apr 2017 07:15:28 -0500 From: Ravi Babu To: Date: Thu, 27 Apr 2017 17:45:20 +0530 Message-ID: <1493295321-15498-3-git-send-email-ravibabu@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1493295321-15498-1-git-send-email-ravibabu@ti.com> References: <1493295321-15498-1-git-send-email-ravibabu@ti.com> MIME-Version: 1.0 Cc: trini@konsulko.com Subject: [U-Boot] [PATCH v2 2/3] common: dfu: ignore reset for spl-dfu X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The SPL-DFU feature enable to load and execute u-boot over usb from PC using dfu-util. Hence dfu-reset should not be issued when dfu-util -R switch is issued. Signed-off-by: Ravi Babu --- common/dfu.c | 2 +- common/spl/Kconfig | 4 ++++ drivers/dfu/dfu.c | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/dfu.c b/common/dfu.c index 0e9f5f5..546a1ab 100644 --- a/common/dfu.c +++ b/common/dfu.c @@ -88,7 +88,7 @@ exit: board_usb_cleanup(usbctrl_index, USB_INIT_DEVICE); if (dfu_reset) - run_command("reset", 0); + do_reset(NULL, 0, 0, NULL); g_dnl_clear_detach(); diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 1231351..f51ae2c 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -6,6 +6,9 @@ config SUPPORT_SPL config SUPPORT_TPL bool +config SPL_DFU_NO_RESET + bool + config SPL bool depends on SUPPORT_SPL @@ -646,6 +649,7 @@ config SPL_USBETH_SUPPORT config SPL_DFU_SUPPORT bool "Support DFU (Device Firmware Upgarde)" select SPL_HASH_SUPPORT + select SPL_DFU_NO_RESET depends on SPL_RAM_SUPPORT help This feature enables the DFU (Device Firmware Upgarde) in SPL with diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index 8dacc1a..ceb33e3 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -35,7 +35,11 @@ static struct hash_algo *dfu_hash_algo; */ __weak bool dfu_usb_get_reset(void) { +#ifdef CONFIG_SPL_DFU_NO_RESET + return false; +#else return true; +#endif } static int dfu_find_alt_num(const char *s)