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 78B70C433EF for ; Thu, 20 Jan 2022 15:30:29 +0000 (UTC) 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) 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-Google-Smtp-Source: ABdhPJwPBz4kHwOwqeETg7sUGcZtq+lisDQEMeOqc330b1k5e2NvgW9FmU3+UZhAPdOx2JXYDkk5EQ== 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 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.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 "