From: Angus Ainslie <angus@akkea.ca>
To: u-boot@lists.denx.de
Cc: Sean Anderson <seanga2@gmail.com>, Simon Glass <sjg@chromium.org>,
Oleh Kravchenko <oleg@kaa.org.ua>,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Roman Stratiienko <r.stratiienko@gmail.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Angus Ainslie <angus@akkea.ca>
Subject: [PATCH 2/2] fastboot: fb_mmc: Add mfgtool all partition size
Date: Fri, 17 Dec 2021 07:42:00 -0800 [thread overview]
Message-ID: <20211217154200.326443-3-angus@akkea.ca> (raw)
In-Reply-To: <20211217154200.326443-1-angus@akkea.ca>
NXP mfgtool uses all to specify the entire partition
Signed-off-by: Angus Ainslie <angus@akkea.ca>
---
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
next prev parent reply other threads:[~2021-12-17 15:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 15:41 [PATCH 0/2] Add more support for NXP's mfgtool Angus Ainslie
2021-12-17 15:41 ` [PATCH 1/2] fastboot: fb_getvar: Add getvar_logical_blocksize for MXP mfgtool Angus Ainslie
2021-12-17 23:10 ` Sean Anderson
2021-12-19 15:25 ` Angus Ainslie
2021-12-17 15:42 ` Angus Ainslie [this message]
2021-12-17 23:02 ` [PATCH 2/2] fastboot: fb_mmc: Add mfgtool all partition size Sean Anderson
2021-12-18 8:44 ` [PATCH 0/2] Add more support for NXP's mfgtool Oleh Kravchenko
2021-12-18 14:34 ` Angus Ainslie
2021-12-18 21:52 ` Oleh Kravchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211217154200.326443-3-angus@akkea.ca \
--to=angus@akkea.ca \
--cc=m.szyprowski@samsung.com \
--cc=oleg@kaa.org.ua \
--cc=patrick.delaunay@foss.st.com \
--cc=r.stratiienko@gmail.com \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).