From patchwork Fri Sep 5 07:01:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siva Durga Prasad Paladugu X-Patchwork-Id: 386160 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 9C5241400B9 for ; Fri, 5 Sep 2014 17:01:59 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 31875A758A; Fri, 5 Sep 2014 09:01:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 XjqtJVpb6EtK; Fri, 5 Sep 2014 09:01:56 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 56446A75BD; Fri, 5 Sep 2014 09:01:54 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 81EB8A7732 for ; Fri, 5 Sep 2014 09:01:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 tTo22L54iBL7 for ; Fri, 5 Sep 2014 09:01:49 +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 na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0186.outbound.protection.outlook.com [207.46.163.186]) by theia.denx.de (Postfix) with ESMTPS id 728C8A758A for ; Fri, 5 Sep 2014 09:01:36 +0200 (CEST) Received: from BN1AFFO11FD052.protection.gbl (10.58.52.31) by BN1AFFO11HUB040.protection.gbl (10.58.52.151) with Microsoft SMTP Server (TLS) id 15.0.1010.11; Fri, 5 Sep 2014 07:01:34 +0000 Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BN1AFFO11FD052.mail.protection.outlook.com (10.58.53.67) with Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport; Fri, 5 Sep 2014 07:01:34 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-smtp1) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1XPnSF-00026w-KB for u-boot@lists.denx.de; Thu, 04 Sep 2014 23:57:07 -0700 From: Siva Durga Prasad Paladugu To: Date: Fri, 5 Sep 2014 12:31:23 +0530 X-Mailer: git-send-email 1.7.4 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-7.5.0.1018-20918.005 X-TM-AS-Result: No--4.803-5.0-31-1 X-imss-scan-details: No--4.803-5.0-31-1 Message-ID: X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(438002)(199003)(189002)(575784001)(93916002)(86362001)(6806004)(102836001)(85852003)(1496007)(19580395003)(104166001)(31696002)(19580405001)(83322001)(44976005)(99396002)(79102001)(89996001)(50986999)(87936001)(92566001)(74662001)(87286001)(88136002)(74502001)(31966008)(77156001)(92726001)(77982001)(76482001)(83072002)(64706001)(20776003)(47776003)(21056001)(107046002)(70736001)(95666004)(81342001)(90102001)(229853001)(2351001)(85306004)(106466001)(81542001)(50466002)(80022001)(110136001)(74316001)(50226001)(4396001)(46102001)(33646002)(104016003)(77096002)(48376002)(62966002)(53416004)(107986001)(192303002)(23106004); DIR:OUT; SFP:; SCL:1; SRVR:BN1AFFO11HUB040; H:xsj-pvapsmtpgw01; FPR:; MLV:sfv; PTR:unknown-60-83.xilinx.com; A:1; MX:1; LANG:; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 0325F6C77B Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=siva.durga.paladugu@xilinx.com; X-OriginatorOrg: xilinx.com Cc: michals@xilinx.com, Siva Durga Prasad Paladugu Subject: [U-Boot] [UBOOT PATCH] f_thor: Dont perform reset at the end of thor X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Dont perform reset at the end of thor download if configured to do reset off. Reset may not be required in all cases and hence provided an option to do so. Signed-off-by: Siva Durga Prasad Paladugu Tested-by: Michal Simek --- drivers/usb/gadget/f_thor.c | 7 +++++++ drivers/usb/gadget/f_thor.h | 3 +++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index c85b0fb..8cf0718 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -123,6 +123,9 @@ static int process_rqt_cmd(const struct rqt_box *rqt) send_rsp(rsp); g_dnl_unregister(); dfu_free_entities(); +#ifdef CONFIG_THOR_RESET_OFF + return RESET_DONE; +#endif run_command("reset", 0); break; case RQT_CMD_POWEROFF: @@ -726,6 +729,10 @@ int thor_handle(void) if (ret > 0) { ret = process_data(); +#ifdef CONFIG_THOR_RESET_OFF + if (ret == RESET_DONE) + break; +#endif if (ret < 0) return ret; } else { diff --git a/drivers/usb/gadget/f_thor.h b/drivers/usb/gadget/f_thor.h index 833a9d2..8341285 100644 --- a/drivers/usb/gadget/f_thor.h +++ b/drivers/usb/gadget/f_thor.h @@ -121,4 +121,7 @@ struct f_thor { #define F_NAME_BUF_SIZE 32 #define THOR_PACKET_SIZE SZ_1M /* 1 MiB */ #define THOR_STORE_UNIT_SIZE SZ_32M /* 32 MiB */ +#ifdef CONFIG_THOR_RESET_OFF +#define RESET_DONE 0xFFFFFFFF +#endif #endif /* _USB_THOR_H_ */