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 A22F1C433EF for ; Fri, 17 Dec 2021 15:42:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 868E48326F; Fri, 17 Dec 2021 16:42:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=akkea.ca header.i=@akkea.ca header.b="XJnHXeVx"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="XJnHXeVx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 073B5830C4; Fri, 17 Dec 2021 16:42:23 +0100 (CET) Received: from node.akkea.ca (li1434-30.members.linode.com [45.33.107.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EDA3D830C5 for ; Fri, 17 Dec 2021 16:42:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=angus@akkea.ca Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 88E044E200E; Fri, 17 Dec 2021 15:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1639755735; bh=zmAYEeeJTsETbylTa+8e+h6ehkPp1VEGMaZJ/QONBv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XJnHXeVxq8m5hSctrrwMSfq/hf2TUs0ZgKAX+X+YzvU8doN/qMd14xsjNp8+cA2gs scKvR+hYt7pIVRie20OZC/AFLiNe2z9+2lkCLdn6XvFmKe4h5q/C8s+wAkyIIhVOM7 GU/driLvE29Qzu5Y/X7UT3Bw92q3vksZhWTLtrNM= Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i6nV6GdD-fS9; Fri, 17 Dec 2021 15:42:15 +0000 (UTC) Received: from midas.localdomain (S0106788a2041785e.gv.shawcable.net [24.108.106.191]) by node.akkea.ca (Postfix) with ESMTPSA id 11BF64E2003; Fri, 17 Dec 2021 15:42:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1639755735; bh=zmAYEeeJTsETbylTa+8e+h6ehkPp1VEGMaZJ/QONBv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XJnHXeVxq8m5hSctrrwMSfq/hf2TUs0ZgKAX+X+YzvU8doN/qMd14xsjNp8+cA2gs scKvR+hYt7pIVRie20OZC/AFLiNe2z9+2lkCLdn6XvFmKe4h5q/C8s+wAkyIIhVOM7 GU/driLvE29Qzu5Y/X7UT3Bw92q3vksZhWTLtrNM= From: Angus Ainslie To: u-boot@lists.denx.de Cc: Sean Anderson , Simon Glass , Oleh Kravchenko , Patrick Delaunay , Roman Stratiienko , Marek Szyprowski , Angus Ainslie Subject: [PATCH 2/2] fastboot: fb_mmc: Add mfgtool all partition size Date: Fri, 17 Dec 2021 07:42:00 -0800 Message-Id: <20211217154200.326443-3-angus@akkea.ca> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211217154200.326443-1-angus@akkea.ca> References: <20211217154200.326443-1-angus@akkea.ca> MIME-Version: 1.0 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 NXP mfgtool uses all to specify the entire partition Signed-off-by: Angus Ainslie --- drivers/fastboot/fb_mmc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index 2738dc836e..9ebf392252 100644 --- a/drivers/fastboot/fb_mmc.c +++ b/drivers/fastboot/fb_mmc.c @@ -84,6 +84,13 @@ static int do_get_part_info(struct blk_desc **dev_desc, const char *name, /* First try partition names on the default device */ *dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV); if (*dev_desc) { + if (!strncmp(name, "all", strlen("all"))) { + info->blksz = (*dev_desc)->blksz; + info->size = (*dev_desc)->lba; + info->start = 0; + return 0; + } + ret = part_get_info_by_name(*dev_desc, name, info); if (ret >= 0) return ret; -- 2.25.1