From patchwork Mon Dec 6 05:45:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 520961 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp4224510imb; Sun, 5 Dec 2021 21:45:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9WZ69SIE64J4b1HdFCogFeDuH4CfzCUMwoPu4G6bTXgBE06lQeQW63nHqGb0telBhGEO0 X-Received: by 2002:a50:f18a:: with SMTP id x10mr50368195edl.193.1638769535977; Sun, 05 Dec 2021 21:45:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638769535; cv=none; d=google.com; s=arc-20160816; b=Oxyh10DcSAzCbRPynqjSaFm2LAVxD/mf87i1aiQRnIqO6s9XaE+7itSk5PwBP9hcX0 lEJlwXZ/wEIghZ4AAp165V7CZLMR90Fng/C1yZjv6oKD0qeDmRlqZvEJYBBKLy5CeFzV 7HHThhYrQE1cS6Dt/BlK0FR0OZx1H8sIqJLP6ltT4WTjS8rW/SqyjRbNUmGD/Yhe7Asy BifeYcPdTvMXKsIR2Mh1chqTkxQOly/TjXnyXeGqXoyjJfOOPS1ixLwU0OBjWkxOZQcV FVow/mmseMLgwKxPm4/yEDhd6Z23lRE1yac7WMev3UD+m04xrXPc5jQ9n2BBKi05Nss5 pFjg== 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=S7t/ypkyDEgF0DpYjfUpFTqzW/wR03p2ESPUAS8tLFKvksP8xA6Oc30PK4fop3KlMb UaigrYGXEg9NAX1Fxin1tNtD2YKXPM82BRMA3Sd88PUAOA0okv05YMRPSfT05+L+SnHA AhHHH7rKjjrx8a+ic+labNkitMMmaMuA1s3k4ROG9eGUydGgD4eqZcC22MEYuTzUBSMR UAw1B+7B4axY9koualtTo3GXyiNeX9xE/OKHBra83OnxxEx9sPGbXl+W7PD/AJI3rLhB 66HTzDDKWRoCbBQ31Ljj73KF/bmm/3OWahKi8H4Ri8B7q6fTGU6z7Pn+ualQIgMbkQwR SQAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DCRpDLjc; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id yd6si14825638ejb.108.2021.12.05.21.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Dec 2021 21:45:35 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DCRpDLjc; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 3A94E830AE; Mon, 6 Dec 2021 06:45:27 +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="DCRpDLjc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 15E0A830B8; Mon, 6 Dec 2021 06:45:25 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) (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 890D483080 for ; Mon, 6 Dec 2021 06:45:15 +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-pg1-x52b.google.com with SMTP id l64so3869489pgl.9 for ; Sun, 05 Dec 2021 21:45:15 -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=DCRpDLjcqtclT2dsH8HuphqRm4BSb7dJDCKtLA7Kq7kfSgBH0t+cGkXEQtrFO/DpEU G8JrrKO1ikrbZyhBpTgF77qQdsylDlhaz7/QkRRr1hRrUTPAb2QoRNOu6/3RKqNWhEr9 +gAPVorVOFpqiYPa/7KcRS+CkdIsCadgczxvqDjw1uaaaZ3cLB9sc616AfPyAe7owg77 390zuCwqiwoDMBacNq//ksYAigEl7tF5N4jReH7IHPgjrfxMTcE53hH7X7jqbNabfmC1 aR8rfs8+FqUrVA0fV40ztlKvYZ1neVFrzwJhTULX4/XjNuwxeDPlUw3wVGSD6Lrt9ezz Q/ng== 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=bOi20Z1lsEVNezlou5jSxxzwk1uwYo4MKBbA9edCdfKAy0KwZ9O6SBWawf0O5OjgUo 5ANOdtEVwWzGz+5aqwlYLW84y/NadC+Sfsw7RvqjaEC9JRKC/ze6kR9Pqlyuy8cJ1tbL 9UxxqQlg+OANw0EufYpnS5uCKaur7vbaYjSHp6pXCxHIiBns0i5o50v43OATMw2O29Sk JVeJEja0k7xA7LNySz5ELlGnBrJfeZPGc6bM1mGLXzO4z1+Ir+Ye50hbLxXSHNAIh/d2 eqnBVZ8q1NZkPmHAAsbI8YbVER5Yo0Bnx65+6TBS9+qyXeXRnU6oKBvJBwaK/Lol0uqV MAGA== X-Gm-Message-State: AOAM533H6+72MbZ6VLzzO1YsMLAsLN1T6wl3BsnI/n/oAo3N2FWQhrnT 2cHXVRAqw07kahAbtupT9wfQMg== X-Received: by 2002:a63:141d:: with SMTP id u29mr11526561pgl.412.1638769513994; Sun, 05 Dec 2021 21:45:13 -0800 (PST) Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id x18sm10564267pfh.210.2021.12.05.21.45.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Dec 2021 21:45:13 -0800 (PST) From: Masami Hiramatsu To: Lukasz Majewski Cc: u-boot@lists.denx.de, ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, jaswinder.singh@linaro.org Subject: [PATCH 5/5] cmd/dfu: Enable 'dfu list' command without DFU_OVER_USB Date: Mon, 6 Dec 2021 14:45:11 +0900 Message-Id: <163876951112.38238.16417526355275476416.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <163876946986.38238.10896882043017582609.stgit@localhost> References: <163876946986.38238.10896882043017582609.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 "