From patchwork Fri Feb 6 08:48:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 437125 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 theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 54B00140276 for ; Fri, 6 Feb 2015 20:00:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BFCD54B804; Fri, 6 Feb 2015 10:00:09 +0100 (CET) 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 r_avIpNcSTn2; Fri, 6 Feb 2015 10:00:09 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2E0E84B7FC; Fri, 6 Feb 2015 10:00:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4212F4B7FC for ; Fri, 6 Feb 2015 10:00:06 +0100 (CET) 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 3sudQeYXQinl for ; Fri, 6 Feb 2015 10:00:06 +0100 (CET) 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 [192.94.94.40]) by theia.denx.de (Postfix) with ESMTPS id C6C984B7FB for ; Fri, 6 Feb 2015 10:00:03 +0100 (CET) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t168oG83004073; Fri, 6 Feb 2015 02:50:16 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t168oFlc022469; Fri, 6 Feb 2015 02:50:15 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Fri, 6 Feb 2015 02:50:14 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t168mN10007034; Fri, 6 Feb 2015 02:50:12 -0600 From: Kishon Vijay Abraham I To: , , , , , , Date: Fri, 6 Feb 2015 14:18:12 +0530 Message-ID: <1423212497-11970-36-git-send-email-kishon@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1423212497-11970-1-git-send-email-kishon@ti.com> References: <1423212497-11970-1-git-send-email-kishon@ti.com> MIME-Version: 1.0 Cc: nsekhar@ti.com, kishon@ti.com Subject: [U-Boot] [u-boot 35/40] common: cmd_dfu: invoke board_usb_cleanup() for cleaning up 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" Invoked board_usb_cleanup for cleaning up initialized USB. It will be invoked if the user enterts ctrl-C. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Lukasz Majewski --- common/cmd_dfu.c | 1 + common/usb.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/common/cmd_dfu.c b/common/cmd_dfu.c index e975abe..161d38b 100644 --- a/common/cmd_dfu.c +++ b/common/cmd_dfu.c @@ -68,6 +68,7 @@ static int do_dfu(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } exit: g_dnl_unregister(); + board_usb_cleanup(controller_index, USB_INIT_DEVICE); done: dfu_free_entities(); diff --git a/common/usb.c b/common/usb.c index 736cd9f..c7cc1b1 100644 --- a/common/usb.c +++ b/common/usb.c @@ -1063,4 +1063,11 @@ int board_usb_init(int index, enum usb_init_type init) { return 0; } + + +__weak +int board_usb_cleanup(int index, enum usb_init_type init) +{ + return 0; +} /* EOF */