From patchwork Thu Jan 20 15:30:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 533544 Delivered-To: patch@linaro.org Received: by 2002:ad5:5d50:0:0:0:0:0 with SMTP id x16csp1676382imu; Thu, 20 Jan 2022 07:30:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzbEZtUpbtUMYiriXOAiz5ATQu2yJz+0JePw40VLlcSm8R/gxs0fiuX7dHqxjMFyuctW7oU X-Received: by 2002:a17:907:1c14:: with SMTP id nc20mr31311305ejc.618.1642692629520; Thu, 20 Jan 2022 07:30:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642692629; cv=none; d=google.com; s=arc-20160816; b=Ax4HnA8wZRGgbsjmz2p5J/5C8noo8HnBcpiv2CkAuV513+qIFGRGECIOGNMrPVUuBj AXW4OEYOsYSA6p40c6rbZCo5UBjftOJCtvg/F0gxSdHUeMFp9MO/dEFrN3MHAJ6bdea+ LjDlRi/Mb+ll08dmObEmkRrYiHMccPGVk/g2tc+6r4KJb8NMKWk/0OfGnLPX4kIBZYKe sI4572JRgt/UNS6lEzOvBUosj26Y6bn1A9T4btdrJNhHR0eZgj7d65UZkeqcB0f5hW0V PN87MjEe3XF/vuT/qHlJY6eLPWhO9sQb7Q8fex+pxHYLMqww3TxBI+0whtpm7zcrxDg3 abow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Fc0acCl3MnYd+Yw1Z8+lZif/U99kuk2jt8zTy4DLrMY=; b=jJJz55wXyXtNLI55xBPS/jOITfyFzJb0iAJeWL7L620K179hKKZfWB5GGINifv1R/d ksbSGRaTRAzFm552EDgGPn2axHt1ADcNP/oA6VQnWG1F53DToA8KEYmGKT+7xoAgj8IP dBhm5KHVwxA+Oki3NF1PQv1T2MIFbh4qo7MHeZ/CCrlTKPs1oJUCyPydMyr5p1b38Ekd mH9jH2KvWThFJ78nVt7au4mgnMRPy6MYaxEctUyhZ5DG2pCmLo4v79ADpD5C0o/1Zevb +8n41AiWM54CP54N9OFq5YgWrZI3QwKySq9mS3cjatIY30eSneuVCGToM+Z0fnIK4RNh QVAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ntiG0+bt; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a2si2179407eda.251.2022.01.20.07.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 07:30:29 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ntiG0+bt; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33FDA838BB; Thu, 20 Jan 2022 16:30:21 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.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=linaro.org header.i=@linaro.org header.b="ntiG0+bt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2B419838C7; Thu, 20 Jan 2022 16:30:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 52C84838B7 for ; Thu, 20 Jan 2022 16:30:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pl1-x633.google.com with SMTP id n11so5475303plf.4 for ; Thu, 20 Jan 2022 07:30:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=Fc0acCl3MnYd+Yw1Z8+lZif/U99kuk2jt8zTy4DLrMY=; b=ntiG0+btHGbcp+Sw8f7so9q23NP1U7bcP/QU8jFZdiyMs7PKDCX31Pv4/8nkwekr1o Z9XZQERgNRcNs5WM2s8M2anz3UknRhZWO4Mk7PRYo5IHfwIjao6mLNxikeKObc0wt3OH QaTm9vix0E6+wyAKFNBgIRPxZ12/Gt/TcSfN8yNzfsM03U65Jknv9zEu9n/627dke94k lz48gil0Y1ygPsn+USpxghJYMq1bUcvGRW4I9NK9JKKRsZ7opOIDuwv0leHWw29kYYWj J4W+/pmHw3ZJ9I1Ji6V6nkWLSj6IXRwsjDU/CM/o2LmKwbWZst2sqcrpurTWeeihvDg2 BnGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=Fc0acCl3MnYd+Yw1Z8+lZif/U99kuk2jt8zTy4DLrMY=; b=8KPotrdobo+MRwJOuF/dylQqod7U+2b3IOkjOo0wIzeaxVQ/Owkdw78coL9KgZbmlI 6eq0db8+fKFvwTJ8GxtrAhPmq9cdPs3eeTl4VyM1sBTzYKLyhFBt7zYwLXrCX+FXhrRC uZT48/fZfdpj/ZM5zFLtTHE6p+gxelBPNqy61+0WYIEGTZEE0A/KwtUupRRh7E7b/ohI 8QVzzWMOvztZEUXwTvHrlWC6EOXFXkcaPR3MpLSO/t4fXPxnRZzZh4UocJJUl2dvwS1d D774iG43+PHykX8i200mqa80xHqSDWqLTV0zyjjBrD0grw5HDoPF3s08EzpJoPkv0qO2 oJQw== X-Gm-Message-State: AOAM530+DYCKU192d6Vy4fytSnw01DLoD+MTUDSo8Dek5oBRHMntuZkr 3N4JB875R2ZHBUniTA01RCT4JXgaooPIGQ== X-Received: by 2002:a17:903:11cf:b0:149:a17a:361b with SMTP id q15-20020a17090311cf00b00149a17a361bmr38926017plh.146.1642692614935; Thu, 20 Jan 2022 07:30:14 -0800 (PST) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id d20sm3718324pfv.23.2022.01.20.07.30.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 07:30:14 -0800 (PST) From: Masami Hiramatsu To: u-boot@lists.denx.de Cc: Masami Hiramatsu , Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Simon Glass , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu Subject: [RFC PATCH 05/14] cmd/dfu: Enable 'dfu list' command without DFU_OVER_USB Date: Fri, 21 Jan 2022 00:30:10 +0900 Message-Id: <164269261023.39378.5724493870299819571.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164269255955.39378.260729958623102750.stgit@localhost> References: <164269255955.39378.260729958623102750.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 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.2 at phobos.denx.de X-Virus-Status: Clean Since dfu is not only used for USB, and some platform only supports DFU_OVER_TFTP or EFI capsule update, dfu_alt_info is defined on such platforms too. For such platform, 'dfu list' command is useful to check how the current dfu_alt_info setting is parsed. Signed-off-by: Masami Hiramatsu --- cmd/dfu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/dfu.c b/cmd/dfu.c index 4a288f74c2..208555c888 100644 --- a/cmd/dfu.c +++ b/cmd/dfu.c @@ -50,7 +50,6 @@ static int do_dfu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) if (!strcmp(argv[1], "tftp")) return update_tftp(value, interface, devstring); #endif -#ifdef CONFIG_DFU_OVER_USB ret = dfu_init_env_entities(interface, devstring); if (ret) goto done; @@ -65,6 +64,7 @@ static int do_dfu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) goto done; } +#ifdef CONFIG_DFU_OVER_USB int controller_index = simple_strtoul(usb_controller, NULL, 0); bool retry = false; do { @@ -79,9 +79,9 @@ static int do_dfu(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) } } while (retry); +#endif done: dfu_free_entities(); -#endif return ret; } @@ -100,8 +100,8 @@ U_BOOT_CMD(dfu, CONFIG_SYS_MAXARGS, 1, do_dfu, #ifdef CONFIG_DFU_TIMEOUT " [] - specify inactivity timeout in seconds\n" #endif - " [list] - list available alt settings\n" #endif + " [list] - list available alt settings\n" #ifdef CONFIG_DFU_OVER_TFTP #ifdef CONFIG_DFU_OVER_USB "dfu "