From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DBD3EC433F5 for ; Tue, 25 Jan 2022 17:15:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C6B25838D3; Tue, 25 Jan 2022 18:14:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="si2QBcrG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 40DE783879; Tue, 25 Jan 2022 18:13:43 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 50F22837FC for ; Tue, 25 Jan 2022 18:13:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 06D1FB819A7; Tue, 25 Jan 2022 17:13:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9402C340E6; Tue, 25 Jan 2022 17:13:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643130812; bh=5qJH2Up2niqgeG0eQq/LvLe5BEYdXl7rYe5G/yFVgTE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=si2QBcrGrVR0yoGUXdyUfSOoRwtL9FG1rkHcl2nfbOr6lnewwwQuMfAX0bzEl3Vfw QOBTMJGRmPUkkCneSAXrNeuMh6aF2uVZHiVKW/r4s/2yytMA+sGaWYjx7wAFq0+JPk ynlp9EHh8h2fWtcpP0SvSj9uI3KJwaTtQgirVK3a8VQKneGQFqXtFpls6PDtkOaelP xuS5p/JjYl23+AmwtT/XyFEpQkKxEsL5YLGk1sKKMMR3KcLrhL8x1qbpmLIjsV1CZj FjK99c4ujrlDtQY42FvDAKhKIN5kaCiLAdW6rYzWYepGd88/An4LpGwKH8tYNaSmN1 ikphmhTUn0U1w== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH u-boot-marvell 10/14] tools: kwboot: Remove 2s delay before sending first xmodem packet Date: Tue, 25 Jan 2022 18:13:09 +0100 Message-Id: <20220125171313.14498-11-kabel@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220125171313.14498-1-kabel@kernel.org> References: <20220125171313.14498-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean From: Pali Rohár This delay is not needed anymore since kwboot already handles retrying logic for incomplete xmodem packets and also forces BootROM to flush its input queue. Removing it decreases total transfer time. Signed-off-by: Pali Rohár Signed-off-by: Marek Behún --- tools/kwboot.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 824ae005b2..de433c1b04 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -1142,10 +1142,6 @@ kwboot_xmodem(int tty, const void *_img, size_t size, int baudrate) */ hdrsz += (KWBOOT_XM_BLKSZ - hdrsz % KWBOOT_XM_BLKSZ) % KWBOOT_XM_BLKSZ; - kwboot_printv("Waiting %d ms and flushing tty\n", blk_rsp_timeo); - usleep(blk_rsp_timeo * 1000); - tcflush(tty, TCIOFLUSH); - pnum = 1; rc = kwboot_xmodem_one(tty, &pnum, 1, img, hdrsz, baudrate); -- 2.34.1