From patchwork Wed Jun 3 09:18:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 479817 X-Patchwork-Delegate: sr@denx.de 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 B243D140291 for ; Wed, 3 Jun 2015 19:18:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5D89D4B909; Wed, 3 Jun 2015 11:18:52 +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 aP-iFbzhBhjm; Wed, 3 Jun 2015 11:18:52 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6F0BA4B8F6; Wed, 3 Jun 2015 11:18:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 62ED24B8F7 for ; Wed, 3 Jun 2015 11:18:48 +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 sx45Fe2AXmqp for ; Wed, 3 Jun 2015 11:18:48 +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 mo4-p05-ob.smtp.rzone.de (mo4-p05-ob.smtp.rzone.de [81.169.146.180]) by theia.denx.de (Postfix) with ESMTPS id 390F04B8F6 for ; Wed, 3 Jun 2015 11:18:44 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohfvxEndrDXKjzPMsB3oimjD61I4fPQhgcxm13 X-RZG-CLASS-ID: mo05 Received: from stefan-work.domain_not_set.invalid (b9168f0a.cgn.dg-w.de [185.22.143.10]) by post.strato.de (RZmta 37.6 AUTH) with ESMTPA id f05b80r539IW6di; Wed, 3 Jun 2015 11:18:32 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Wed, 3 Jun 2015 11:18:21 +0200 Message-Id: <1433323111-28819-3-git-send-email-sr@denx.de> X-Mailer: git-send-email 2.4.2 In-Reply-To: <1433323111-28819-1-git-send-email-sr@denx.de> References: <1433323111-28819-1-git-send-email-sr@denx.de> Cc: Dirk Eibach , Yehuda Yitschak , Luka Perkov , Tawfik Bayouk , Eran Ben-Avi Subject: [U-Boot] [PATCH v1 02/12] tools/kwboot: Add parameters to set delay and timeout via cmdline 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" To support the Armada 38x, new values for the request-delay and the response-timeout are needed. As the values already implemented in this tool (for Kirkwood and Armada XP) don't seem to work here. To make this more flexible, lets add make those 2 parameters configurable via the cmdline. Here the new parameters: -q : use specific request-delay -s : use specific response-timeout For the Marvell DB-88F6820 these values are known to work: One board: -q 2 -s 1 2nd board: -q 5 -s 5 So this seems to be even board specific. But with this patch now those values can be specified and tested via the cmdline. Signed-off-by: Stefan Roese Cc: Kevin Smith Cc: Dirk Eibach Cc: Luka Perkov --- tools/kwboot.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/kwboot.c b/tools/kwboot.c index 1368b4c..af7a6ee 100644 --- a/tools/kwboot.c +++ b/tools/kwboot.c @@ -657,7 +657,7 @@ static void kwboot_usage(FILE *stream, char *progname) { fprintf(stream, - "Usage: %s [-d | -a | -b | -D ] [ -t ] [-B ] \n", + "Usage: %s [-d | -a | -q | -s | -b | -D ] [ -t ] [-B ] \n", progname); fprintf(stream, "\n"); fprintf(stream, @@ -667,6 +667,8 @@ kwboot_usage(FILE *stream, char *progname) " -D : boot without preamble (Dove)\n"); fprintf(stream, " -d: enter debug mode\n"); fprintf(stream, " -a: use timings for Armada XP\n"); + fprintf(stream, " -q : use specific request-delay\n"); + fprintf(stream, " -s : use specific response-timeout\n"); fprintf(stream, "\n"); fprintf(stream, " -t: mini terminal\n"); fprintf(stream, "\n"); @@ -699,7 +701,7 @@ main(int argc, char **argv) kwboot_verbose = isatty(STDOUT_FILENO); do { - int c = getopt(argc, argv, "hb:ptaB:dD:"); + int c = getopt(argc, argv, "hb:ptaB:dD:q:s:"); if (c < 0) break; @@ -731,6 +733,14 @@ main(int argc, char **argv) msg_rsp_timeo = KWBOOT_MSG_RSP_TIMEO_AXP; break; + case 'q': + msg_req_delay = atoi(optarg); + break; + + case 's': + msg_rsp_timeo = atoi(optarg); + break; + case 'B': speed = kwboot_tty_speed(atoi(optarg)); if (speed == -1)