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 15CDDC433EF for ; Mon, 6 Dec 2021 05:45:36 +0000 (UTC) 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) 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-Google-Smtp-Source: ABdhPJy+eCa/eszZ/83N6JQEMHoS8DdJrrBG2i2JAfZn/yvPOCPyzqpxDPAY637D2BUzmxac92EAUw== 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 "